Russia accused the United States of trying to usurp power in Venezuela and warned against US military intervention there, putting it at odds with Washington and the EU which backed protests against one of Moscow's closest allies.

Venezuelan opposition leader Juan Guaido declared himself interim leader on Wednesday, winning the support of Washington and parts of Latin America and prompting Socialist President Nicolas Maduro, who has led the oil-rich nation since 2013, to sever diplomatic ties with the United States.

The prospect of Maduro being ousted is a geopolitical and economic headache for Moscow which, alongside China, has become a creditor of last resort for Caracas, lending it billions of dollars as its economy implodes. Moscow has also provided support for its military and oil industry.

Russia on Thursday accused Washington of stoking street protests and of trying to undermine Maduro, whom it called the country's legitimate president.

"We consider the attempt to usurp sovereign authority in Venezuela to contradict and violate the basis and principles of international law," Kremlin spokesman Dmitry Peskov said.