Negotiations over Iran’s nuclear program reached a critical phase Monday with diplomats struggling to overcome substantial differences before today’s deadline for the outline of an agreement.

The top diplomats from the five permanent members of the U.N. Security Council and Germany were engaged in a marathon meeting with Iranian representatives to try to bridge remaining gaps and hammer out an understanding that would serve as the basis for a final accord to be reached by the end of June.

“We are working late into the night and obviously into tomorrow,” said U.S. Secretary of State John Kerry. He has been meeting with his Iranian counterpart, Mohammad Javad Zarif, in Lausanne since Thursday in an intense effort to reach a political understanding on terms that would curb Iran’s nuclear activities in exchange for sanctions relief.

“There is a little more light there today, but there are still some tricky issues,” Kerry said. “Everyone knows the meaning of tomorrow.”

Kerry and others at the table said the sides have made some progress, with Iran considering demands for further cuts to its uranium enrichment program but pushing back on how long it must limit technology it could use to make atomic arms. In addition to sticking points on research and development, differences remained on the timing and scope of sanctions removal, officials said.

German Foreign Minister Frank-Walter Steinmeier said Iran’s expectations from the talks are “very ambitious” and not yet acceptable to his country or the other five negotiating: the U.S., Britain, China, France and Russia.

“We will not allow a bad deal,” Steinmeier said. “We will only arrive at a document that is ready to sign if it … excludes Iran getting access to nuclear weapons. We have not yet cleared this up.”

Especially problematic, Steinmeier said, was the question of limits on research and development Iran would be allowed to continue under the agreement.

Other officials said the scope and timing of sanctions relief was also a major sticking point.

“Very substantial problems remain to be solved,” Gerard Araud, the French ambassador to the United States, said in a tweet.

In a sign that the talks would go down to the wire, Russian Foreign Minister Sergey Lavrov left to return to Moscow. His spokeswoman said he would will return to Lausanne today only if there was a realistic chance for a deal.

Meanwhile, Iran’s deputy foreign minister, Abbas Araghchi, told Iranian state television that the talks were not likely to reach any conclusion until “tomorrow or the day after tomorrow.”

“We are not still in the position to be able to say we are close to resolving the (remaining) issues but we are hopeful and we’ll continue the efforts,” he said.

The Obama administration says any deal will stretch the time Iran needs to make a nuclear weapon from the current two to three months to at least a year. But critics object that it would keep Tehran’s nuclear technology intact, and Israeli Prime Minister Benjamin Netanyahu — at the forefront of accusations that Iran is helping Shiite rebels advance in Yemen — says the deal would send the message that “there is a reward for Iran’s aggression.”