Afghan President Hamid Karzai, already at odds with the U.S. over a vital security pact, snubbed western leaders once again by joining the likes of Syria and Venezuela in backing Russia's annexation of Crimea.

Karzai's office released a statement over the weekend saying Afghanistan "respects the free will of the people of Crimea to decide about their own future."

The statement said "we respect the decision the people of Crimea took through a recent referendum that considers Crimea as part of the Russian Federation."

Karzai weighed in on the Ukraine crisis shortly before President Obama flew overseas for meetings with European partners. The Obama administration and European allies have described the Crimea referendum, and Russia's decision to annex the peninsula, as "illegitimate."

The Afghanistan statement, though, was yet another indication of how far the Karzai administration has drifted away from the U.S. as the Afghanistan war -- or the United States' involvement in it -- draws to a close, despite Washington's past support for his presidency. Karzai, in backing Moscow, was also aligning with actors who, under the Soviet Union, prosecuted a prior decade-long war in his country. The U.S. backed Afghan groups fighting against the Soviet-led forces in that war.

Karzai may now be seeking to court Russia, for its aid and general support, as American forces withdraw from the country.

Karzai, though, so far has refused to sign a security agreement that would provide for a residual force of U.S. troops to stay behind after the final withdrawal.

In his final address to Afghanistan's parliament earlier this month, Karzai told the United States its soldiers can leave at the end of the year because his military, which already protects 93 percent of the country, was ready to take over entirely.

The Afghan president has come under heavy pressure to sign the Bilateral Security Agreement, with a council of notables that he himself convened recommending that he sign the pact. The force would train and mentor Afghan troops, and some U.S. Special Forces would also be left behind to hunt down Al Qaeda.

All 10 candidates seeking the presidency in April 5 elections have said they would sign the security agreement. But Karzai himself does not appear to want his legacy to include a commitment to a longer foreign troop presence in his country.

Facing Karzai's refusal, Obama already has asked the Pentagon to draft plans for a complete withdrawal of U.S. troops from Afghanistan by the end of the year.

The Associated Press contributed to this report.