Months of exhausting negotiations were meant to culminate in an agreement by Sunday that would limit programs Iran says it needs to produce energy and for other peaceful purposes but which can also be used to make nuclear arms. In return, Tehran would have gotten progressive relief from all nuclear-related sanctions on its economy.