President Donald Trump recognized Juan Guaido, head of Venezuela’s opposition-led National Assembly, as the country’s interim president Wednesday, rejecting President Nicolas Maduro's contested swearing-in two weeks ago to a second term.

Guaido, 35, declared himself interim president before thousands of cheering supporters Wednesday and said he was “formally assuming the responsibility of the national executive.”

Tens of thousands of Venezuelans, angry over spiraling inflation, a shortage of basic goods and a migration crisis, took to the streets to demand that Maduro step down. But Maduro is garnering support in other corners: Russia has announced it recognizes Maduro as president.

"In its role as the only legitimate branch of government duly elected by the Venezuelan people, the National Assembly invoked the country's constitution to declare Nicolas Maduro illegitimate, and the office of the presidency therefore vacant," Trump said in a statement. "The people of Venezuela have courageously spoken out against Maduro and his regime and demanded freedom and the rule of law."

Canada also announced it was recognizing Guaido.

Maduro appears to be gearing up for a contentious fight and is not walking silently into the background. He gave U.S diplomatic personnel 72 hours to leave the country.

Secretary of State Mike Pompeo said in a statement late Wednesday that the U.S. will continue its diplomatic presence in Venezuela.

"The United States stands with interim President Juan Guaido," Pompeo said. "The United States maintains diplomatic relations with Venezuela . . . The United States does not recognize the Maduro regime."

Pompeo said that the U.S. "does not consider (Maduro) to have the legal authority to break diplomatic relations with the United States or to declare our diplomats persona non grata."

Vice President Mike Pence referred to Maduro this week as a dictator who did not win the presidency in free and fair elections.

Secretary of State Mike Pompeo called on Maduro to step aside and urged the country's military to support efforts to restore democracy. In a statement, Pompeo said Washington would support Guaido as he establishes a transitional government and prepares the country for elections.

"The Venezuelan people have suffered long enough under Nicolas Maduro's disastrous dictatorship," Pompeo said. "We call on Maduro to step aside in favor of a legitimate leader reflecting the will of the Venezuelan people."

Maduro, 56, was hand-picked by socialist president Hugo Chavez to be his successor. Chavez died in 2013.

While Chavez remains well regarded among many Venezuelans, his statue in the city of San Felix was set on fire and destroyed during anti-government protests Tuesday.

Sen. Marco Rubio, R-Fla., an outspoken critic of the Maduro governments, warned on Twitter that Maduro was using the unrest to crack down on Venezuelans. He also urged the State Department to expel all Maduro diplomatic personnel from the United States.

“The regime’s response is being directed by #Cuba’s intelligence agency," he wrote. "Expect them to undertake a massive disinformation effort, cut off internet, use agitators to provoke violence & ultimately accuse members of National Assembly of treason & terrorism.”

Contributing: The Associated Press