The top U.S. and Iranian diplomats searched Monday for a breakthrough in nuclear talks, their efforts complicated by crises across the Middle East and elsewhere that have Washington and Tehran aligned in some places but often opposed.

The state of U.S.-Iranian relations was adding a new wrinkle to the long negotiation aimed at curbing the Islamic republic’s uranium and plutonium programs.

While the two sides are arguably fighting proxy wars in Israel, Gaza and Syria, they’re talking cooperation in Iraq and Afghanistan. And, perhaps in a first, the nuclear matter is battling for full attention.

U.S. Secretary of State John Kerry and Iranian Foreign Minister Mohammed Javad Zarif spoke for about two hours around midday Monday, the second day of talks in Vienna. They gathered again in the afternoon, hoping to make progress before Sunday’s initial deadline for a comprehensive nuclear agreement. An extension of the deadline is possible, though there are opponents of that idea on both sides.

“We are in the middle of talks about nuclear proliferation and reining in Iran’s program,” Kerry told U.S. Embassy staff in Vienna during a break in the conversations. “It is a really tough negotiation.”

But other matters were being discussed, too, including Afghanistan, where Kerry visited before Vienna to broker a power-sharing agreement between rival presidential candidates and a full audit of their contested election.

But even as the U.S. and Iran have recently found increasing areas for cooperation, such as stemming a flow of Sunni extremists into Iraq, they remain diametrically opposed elsewhere.

The U.S-Iranian regional divide was underscored Monday as the Israeli military downed a drone launched by Gaza militants.

Iran is Hamas’ primary benefactor and the presumed source of its newfound drone capacity. Washington provides billions in aid each year to Israel.

The State Department didn’t say if Kerry and Zarif broached the escalating Israeli-Palestinian violence or the civil war in neighboring Syria, where the U.S. is providing political and military support to moderate rebels fighting President Bashar Assad’s Iranian-backed government.

But one change appeared clear in this week’s talks. Unlike in years past, where U.S.-Iranian interaction appeared largely limited to nuclear matters, the two countries’ interests now crisscross at multiple levels, and their discussions are broader.

Nevertheless, American officials said Kerry was focused on tackling the many differences between the U.S. and Iran on nuclear matters. His goal is to gauge “Iran’s willingness to make the critical choices it needs to make,” according to a senior State Department official.

The official wasn’t authorized to be quoted by name and demanded anonymity.

Even if their interests in continuing nuclear talks align, both Kerry and Zarif face difficult internal pressures against a deal — or an extension.

Iranian hardliners oppose almost any concession by President Hassan Rouhani’s government. In the U.S., some lawmakers have threatened to scuttle any emerging agreement if it would allow Iran to maintain some enrichment capacity.