CARACAS, Venezuela — The embattled government of Venezuela struck back against its opponents on Thursday, winning strong support from the country’s armed forces and the solid backing of Russia, which warned the United States not to intervene.

The events put Venezuela’s president, Nicolás Maduro, at the center of a Cold War-style showdown between Russia, an ally that has shored up his government with billions of dollars, and the United States, which has denounced him as a corrupt autocrat with no legitimacy.

The Trump administration pressed its case on Thursday, with Secretary of State Mike Pompeo calling on all countries in the hemisphere to reject Mr. Maduro and “align themselves with democracy,” setting up a test of wills with the Kremlin.

Only a day before, Mr. Maduro’s political nemesis, the opposition leader Juan Guaidó, seemed to have the momentum. During nationwide protests against the government, he proclaimed himself the country’s rightful president, earning endorsements from President Trump and several governments in the region.