Updated

Secretary of State John Kerry said Wednesday he is still confident that the U.S. administration can conclude a nuclear deal with Iran after President Barack Obama agreed to sign legislation giving Congress the right to reject an agreement.

Kerry joined his counterparts from the Group of Seven industrial powers at a meeting in northern Germany on the gathering's second day, flying in overnight after discussing Iran with lawmakers in Washington.

"Yesterday there was a compromise reached in Washington regarding congressional input," Kerry told reporters in the Baltic Sea port of Luebeck. "We are confident about our ability for the president to negotiate an agreement, and to do so with the ability to make the world safer."

Kerry said the challenge of finishing the negotiations with Iran over the next 2 1/2 months would loom large over the G-7 meeting.

Its host, German Foreign Minister Frank-Walter Steinmeier, said ministers would discuss the deal between the U.S. administration and Congress, which he said would have "a certain influence" on whether a deal with Iran can be achieved by a June 30 deadline.

Steinmeier said other topics would include conflicts in the Middle East, prospects for peace talks between Israel and the Palestinians, efforts to combat the Islamic State group, the Ebola outbreak in West Africa, the impact of climate change on political stability in Africa and Asia, and the ongoing fighting in Ukraine.

"The weather in international politics is quite stormy," he said. "The conflict in eastern Ukraine is only two hours away from here."

Steinmeier said the G-7's top diplomats would also issue a statement on maritime security, noting that Luebeck was plagued by pirates until the Hanseatic League -- an alliance of northern European trading cities -- cracked down on the practice some 600 years ago.

Although Russia was ejected from what was then the G-8 last year over its support for armed separatists in eastern Ukraine, Steinmeier praised Moscow for what he called its "constructive attitude" in not blocking a U.N. Security Council resolution imposing an arms embargo on Houthi rebel leaders in Yemen.