MONTREUX, Switzerland—Iran and six major powers are nearing an understanding that a final nuclear deal must be structured around the U.S. demand that Tehran stay at least a year away from amassing enough fuel for a nuclear weapon, according to people familiar with the negotiations.

The understanding about Iran’s so-called breakout time, if it can be nailed down as part of a broader package, could open the way to a final nuclear agreement in coming weeks, diplomats say, even as they warned again on Wednesday that difficult obstacles to a deal remain.

The breakout period has been one of the talks’ critical questions. Last year, negotiations bogged down over Iran’s refusal to accept steps that would constrain its nuclear activities enough to meet the U.S. goal.

In the end, the deadline for talks had to be rolled over twice, feeding skepticism in Washington and Tehran about whether a deal was possible.

In recent weeks, however, people familiar with the talks say Iran’s position is shifting. While there is no explicit agreement on the 12-month breakout period, officials say there is a growing understanding on all sides that it must be part of a deal.