Iraq joined Russia, Iran and Syria in a new agreement to strengthen cooperation against extremist group Islamic State, extending the Kremlin’s reach in the Middle East as it rivals Washington for influence.

U.S. and Russian officials held talks Sunday on the sidelines of a United Nations summit in New York to try to forge a common approach to fighting Islamic State, a day before President Barack Obama and Russian President Vladimir Putin were to hold their first formal meeting in more than two years at the U.N. The two had an informal encounter in November on the sidelines of a G-20 summit in Australia.

Iraq’s Defense Ministry said Sunday that the country had signed an intelligence and security cooperation pact with Russia, Iran and Syria, pledging to cooperate in collecting information about Islamic State. The deal effectively formalizes years of military collaboration among the four nations, which have intermittently been allies since the 1980s.

The deal is another challenge to U.S. influence in the Middle East at a time when Russia is deploying new military assets—primarily in support of Syrian President Bashar al-Assad—including fighter aircraft and attack helicopters in the coastal region of Syria.

At the same time, the U.S.-led international coalition that has been striking Islamic State targets in Iraq and Syria from the air since last fall is grappling with a series of setbacks.