Updated

Iran's president says an agreement on curbing its nuclear program is "very likely" by July despite a snag in talks last week, but said negotiations might also be extended.

President Hassan Rouhani spoke Thursday in Shanghai after attending an Asian security conference.

Talks in Vienna stalled last Friday, denting hopes negotiators could meet a July 20 target date. The failure to advance diminished a sense of optimism that had been growing since talks began Feb. 18 on a comprehensive deal.

Rouhani said "it is very likely that we can come to an agreement by the end of July." He said that depended on unspecified countries not being giving a chance to "create problems."

He said the deadline could be extended by six months.

"We have no rush," he said.