VIENNA -- A year and half of nuclear talks between Iran and major powers were creeping toward the finish line Friday as negotiators wrestled with sticking points including questions about Tehran’s past atomic research. Iran is in talks with the U.S. and five other powers -- Britain, China, France, Germany and Russia -- on an agreement to curtail its nuclear program in exchange for relief from economic sanctions.

“We are coming to the end,” said a senior Western diplomat, who added there was no plan to carry on for long past next Tuesday. “Either we get an agreement or we don’t,” he said, adding that the process “remains quite difficult.”

U.S. Secretary of State John Kerry and Iranian Foreign Minister Mohammad Javad Zarif appeared to be reading from the same script as they spoke to reporters before a meeting with their top aides Friday evening.

“We are making progress,” Kerry said. “We have a lot of work to do. There are some tough issues, but [there’s a] genuine effort by everybody.”

Zarif added: “I agree. We are all trying very hard in order to be able to move forward and we have made some progress. There are still tough issues to discuss.”

Still, all sides say a deal is within reach. U.S., European and Iranian officials, including U.S. Under Secretary of State Wendy Sherman and Iranian deputy foreign ministers Abbas Araqchi and Majid Takhteravanchi, held a six-hour negotiating session that ended Friday at 3 a.m. local time, a senior U.S. official said.

Russia’s chief negotiator Sergei Ryabkov said the text of the agreement was more than 90 percent complete. Chinese Foreign Minister Wang Yi voiced confidence that the parties would reach a mutually acceptable accord.

The negotiators missed a June 30 deadline for a final agreement, but have given themselves until July 7, and foreign ministers not already in Vienna are due to return Sunday for a final push.

If reached, an agreement would require Iran to severely curtail uranium-enrichment work for more than a decade to ensure it would need at least one year’s “breakout time” to produce enough highly enriched uranium for a single weapon, compared with current estimates of two to three months.

Questions About Iran’s Past

Western and Iranian officials said there were signs of a compromise emerging on one of the major sticking points: access to Iranian sites to monitor compliance with a future agreement.

Another potential compromise emerging relates to Iran’s low enriched-uranium stockpiles. Western and Iranian diplomats said Tehran was considering shipping most of the stockpile out of the country, something Tehran had previously ruled out.

A senior Iranian official in Vienna said Thursday that Iran would sign up to an International Atomic Energy Agency (IAEA) inspection regime called the Additional Protocol, which would be provisionally implemented at the start of a deal and later ratified by Iran’s parliament.

The protocol allows IAEA inspectors increased access to sites where they suspect nuclear activity is taking place, but U.S. officials say it is insufficient because Iran has in the past stalled by dragging out negotiations over access requests.

The Iranian official said Iran could also agree to a system of “managed access” -- which is strictly limited to protect legitimate military or industrial secrets -- to relevant military sites.

Iran’s Supreme Leader Ayatollah Ali Khamenei, who has the power to block a deal, last week ruled out either a long freeze of sensitive nuclear work or opening military sites to inspectors.

A Western diplomat told Reuters: “The positions set out by Khamenei last week make it more difficult to bridge the gaps in the next few days, and there is still work to be done.”

The issue of Iran’s past nuclear research is also difficult.

Yukiya Amano, head of the IAEA, met Iranian President Hassan Rouhani and other officials in Tehran Thursday to discuss the IAEA’s unresolved questions. But he said in a statement Friday there had been no breakthrough and “more work will be needed.”

Western diplomats said they were not demanding a public confession that Iran had conducted research into building a nuclear warhead, but that the IAEA had to be satisfied it knew the full scope of past Iranian activity to establish a credible basis for future monitoring.

Officials close to the Vienna talks say the suspension of some sanctions will be tied to resolving this issue. “It’s time to close this chapter,” the senior Western diplomat said.

Other sticking points include the timing of the suspension of sanctions, and Iranian acceptance of a plan to restore U.S., European Union and United Nations sanctions if Tehran fails to comply with the terms of the agreement.

(Reporting by John Irish and Louis Charbonneau; Additional reporting by Parisa Hafezi, Arshad Mohammed and Shadia Nasralla; Writing by Louis Charbonneau; Editing by Kevin Liffey and Anna Willard)