U.S. Secretary of State John F. Kerry, left, and Russian Foreign Minister Sergey Lavrov reached the agreement in Paris on Tuesday. (Carolyn Kaster/AP)

The United States and Russia will share intelligence on Islamic State militants in Syria and Iraq and work together to combat the threat of terrorism that hangs over the region, U.S. Secretary of State John F. Kerry said Tuesday after meeting with Russian Foreign Minister Sergei Lavrov.

After three hours of talks in Paris, Kerry said Russia has agreed to “explore” whether to provide more weapons to Iraqi security forces fighting Islamist extremists, as well as to train and advise them.

The two top diplomats also discussed how to keep Iran’s nuclear program from being converted to military use.

“We are deeply committed to the diplomatic effort to try to reach an agreement that assures the international community of the fact that the Iranian nuclear program is exclusively peaceful,” said Kerry, who is to meet with Iranian Foreign Minister Mohammad Javad Zarif on Wednesday in Vienna as a Nov. 24 deadline to finalize an agreement looms.

The U.S.-Russian willingness to work jointly on the two fronts was the first sign of a thaw after seven months of grinding dispute over Russia’s actions in Ukraine.

President Barrack Obama told military chiefs from 21 nations he is "deeply concerned about the situation in and around the Syrian town of Kobane," on Tuesday. (Reuters)

Kerry’s language was conciliatory, stressing areas in which the two nations can cooperate despite their deep differences.

Although Russia recently withdrew some troops from its border with Ukraine, Kerry said Western economic sanctions will not be lifted unless Russia pulls back its heavy weaponry from the frontier and allows observers from the Organization for Security and Cooperation in Europe to monitor and secure the border.

He said another precondition is the release of all prisoners held amid the conflict. He specifically cited the case of Nadiya Savchenko, a helicopter navigator who turned into a symbol of Ukrainian resistance after she was detained by pro-Moscow separatists in a firefight in eastern Ukraine and ended up in a Russian prison.

Kerry and Lavrov began their meeting on a casual note. They sat for half an hour on a wooden park bench outside the U.S. ambassador’s residence, gesturing animatedly before wandering inside to a more formal setting.

The standoff between Russia and the United States has steadily worsened since Russia annexed Ukraine’s Crimean Peninsula in March, a move that Kiev still views as illegitimate. The resulting stalemate over Ukraine is the worst since the end of the Cold War. Kiev and its Western allies accuse Russia of instigating the conflict by sponsoring rebels in eastern Ukraine. The Kremlin denies supporting them.

A cease-fire signed in early September lays the groundwork for an uneasy equilibrium in which Russia maintains power over a key stretch of its neighbor’s industrial heartland, but the truce has not ended the fighting. Russian President Vladimir Putin and Ukrainian President Petro Poroshenko will meet Friday in Milan to discuss the conflict.

Over the weekend, Putin ordered the pullout of more than 17,000 troops massed along the border with Ukraine, signaling a desire to de-escalate the situation.

Despite the potential openings for easing tensions, however, the rhetoric remains sharp.

Just hours before Lavrov arrived in Paris, he delivered a defiant speech to a group of European businesspeople in Moscow. He said Russia would move to protect itself against Western sanctions by reducing its reliance on imports in fields such as technology and defense.

He also said the European Union had helped usher into power leaders in Ukraine who “rely on the ideas and slogans rooted in the dismal Hitler era,” the news agency Interfax reported. Russian leaders often focus on the role of far-right Ukrainian nationalist groups in the protests that toppled pro-Moscow President Viktor Yanukovych in February. They have been less harsh toward Poroshenko, who was elected president three months later.

Earlier in the day, Kerry met with Libya’s foreign minister amid rising concern that fighting in the North African nation is allowing jihadists to slip across its border with Egypt.

The talk with Mohammed al-Dairi was a surprise addition to Kerry’s schedule in Paris and reflects growing fears that Libya is becoming a haven for Islamist extremists as it slides into anarchy. A militia from the western city of Misurata has taken control of the capital, Tripoli, while another group of militants holds the eastern city of Benghazi and the internationally recognized government has retreated to the eastern city of Tobruk.

Birnbaum reported from Moscow.