MOSCOW — More than a month later than most world leaders, Russian President Vladimir Putin and Mexican President Andrés Manuel López Obrador on Tuesday congratulated President-elect Joe Biden on his victory, a delayed recognition that could affect future relations.

“In his message Vladimir Putin wished the president-elect every success and expressed confidence that Russia and the United States, which bear special responsibility for global security and stability, can, despite their differences, effectively contribute to solving many problems and meeting challenges that the world is facing today,” the Kremlin said in a statement.

It went on to say that Putin relayed to Biden that he is “ready for interaction and contact” and suggested cooperation between the two countries based on “equality and mutual respect.”

López Obrador, in a letter to Biden, said he appreciated Biden’s position of “supporting Mexico’s and the world’s migrants” and urged him to “maintain good bilateral relations based on collaboration, friendship and respect for the sovereignty of our respective countries.”

The Russian and Mexican leaders were among the last heads of state to acknowledge Biden’s win; Brazil’s Jair Bolsonaro and North Korea’s Kim Jong Un have yet to extend congratulations to Biden. Biden’s victory advanced another step Monday when 306 electors voted for him.

Other leaders did not wait for the electoral college; they reached out to Biden after U.S. television networks called the race for him, as is customary. In 2016, Putin congratulated Donald Trump within hours of his acceptance speech. Kremlin spokesman Dmitry Peskov said this year differed because Trump had not conceded and was contesting the count in several swing states through legal action. Peskov said the Kremlin would wait until the result became “official,” without specifying what that meant.

In an interview with Russian state television on Nov. 22, more than two weeks after the networks called the race for Biden, Putin referred to him as “the presidential candidate” and said the delay was due to the “internal political standoff” in the United States and “not that we like or dislike someone.”

But analysts viewed Putin’s silence as an attempt to grant legitimacy to Trump’s baseless claims that the election was marred by fraud.

Even before Election Day, officials in Moscow expressed pessimism that either result would improve the countries' strained relationship. But Biden is expected to take a harder line on Russia, particularly now that Russian government hackers are believed to be behind the recent digital spying operation that hit the Department of Homeland Security, the State, Treasury and Commerce departments and the National Institutes of Health.

In an interview with “60 Minutes” before the election, Biden called Russia “the biggest threat to America right now in terms of breaking up our security and our alliances.”

During the Trump administration, U.S.-Mexico relations were tumultuous, with the White House threatening tariffs on Mexican goods if Mexico did not crack down on migration, a protracted renegotiation of the North American Free Trade Agreement and, most recently, the Justice Department’s arrest of a former Mexican defense secretary. Still, relations between Trump and López Obrador were mostly warm — both men fashioning themselves as populists, lambasting the news media and their political predecessors.

López Obrador explained his reluctance to congratulate Biden as an effort to promote a noninterventionist foreign policy while the United States sorted out its domestic political issues. But many Mexican analysts saw an attempt to avoid offending Trump and upsetting the fragile bilateral relationship.

But López Obrador appeared willing to risk offending the incoming Biden administration, which will work closely with Mexico on a range of issues, including migration, trade and security. On migration in particular, the two leaders will consider how to unwind some of the Trump administration’s most controversial policies, including one that has sent tens of thousands of non-Mexican asylum applicants back to Mexico to wait for their U.S. court dates.

Sieff reported from Mexico City.