President Trump officially recognized opposition leader Juan Guaido as the Interim President of Venezuela on Wednesday, amid massive rallies throughout the country with citizens protesting against the socialist government of Nicolas Maduro.

The 35-year-old Guaido, the head of the opposition-controlled congress, raised his right hand in unison with tens of thousands of supporters and took a symbolic oath before God to assume executive powers he says are his right under Venezuela's constitution and take over the presidency until new elections can be called.

"We know that this will have consequences," he told the cheering crowd. "To be able to achieve this task and to re-establish the constitution we need the agreement of all Venezuelans."

Moments later, the Trump administration issued its statement, saying "the people of Venezuela have courageously spoken against Maduro and his regime and demand freedom and the rule of law."

"I will continue to use the full weight of United States economic and diplomatic power to press for the restoration of Venezuelan democracy," the statement said. "We encourage other Western Hemisphere governments to recognize National Assembly President Guaido as the Interim President of Venezuela, and we will work constructively with them in support of his efforts to restore constitutional legitimacy."

In a tweet, Trump added: "The citizens of Venezuela have suffered for too long at the hands of the illegitimate Maduro regime"

On Wednesday, hundreds of thousands of Venezuelans hit the streets in massive and widespread demonstrations against Maduro’s government. The demonstrators, shouting phrases such as "Get out Maduro!" say they're fed up with spiraling inflation, a shortage of basic good and a migration crisis dividing families.

PENCE OFFICIALLY BACKS VENEZUELAN OPPOSITION, CONDEMNS PRESIDENT MADURO

The protest is considered a crucial test for the reinvigorated opposition as it seeks to send a forceful message that Maduro no longer has the people's backing and appeals to the military and the poor to shift loyalties that until recently looked solidly behind the president. The protests were called to coincide with an historic date for Venezuelans — the anniversary of the 1958 coup that overthrew military dictator Marcos Perez Jimenez.

The demonstrations also follow a whirlwind that saw an uprising by a tiny military unit, fires set during protests in poor neighborhoods and the brief detention by security forces of Guaido. He was released amid an international outcry after he was seen being dragged from an SUV just over a week ago by intelligence agents.

Meanwhile, powerful socialist party leader Diosdado Cabello accused Venezuela's opposition of being on a mission to "threaten and cause terror."

At a pro-government rally Wednesday, the head of the all-powerful constitutional assembly said right-wing forces do not represent the majority. He added that anyone who acts out of line at Wednesday's protest will be met with justice.

Maduro, who started his second term as president on January 11 after disputed elections, is facing increasing hostility from the international community. He has sought to shore up support from the armed forces by doling out key posts to top generals, including one as the head of the PDVSA oil monopoly that is the source of virtually all of Venezuela's export earnings. He has also been playing commander in chief, appearing last week at a military command meeting wearing camouflage fatigues and receiving the blessing of the defense minister, Gen. Vladimir Padrino Lopez.

VENEZUELA’S MADURO STARTS SECOND TERM DESPITE WORSENING ECONOMIC CRISIS, GROWING INTERNATIONAL ISOLATION

Trump's statement Wednesday follows other recent messages of support for the Venezuela opposition from high-ranking members of the Trump administration.

On Tuesday, U.S. Vice President Mike Pence issued a strong message of support for the protests, condemning “dictator” Maduro and declaring U.S. official support for Guaido.

“On behalf of President Donald Trump and all the American people, let me express the unwavering support of the United States as you, the people of Venezuela, raise your voices in a call for freedom,” Pence said in a recorded video message. “Nicolas Maduro is a dictator with no legitimate claim to power. He has never won the presidency in a free and fair election, and has maintained his grip on power by imprisoning anyone who dares to oppose him.”

On Wednesday, U.S. Senator Marco Rubio (R-FL), welcomed Trump's statement, saying the president "has made it clear that he will use the full weight of the United States to press for the restoration of democracy and constitutional legitimacy in Venezuela."

"I also know the President will hold the illegitimate Maduro regime directly responsible for any actions taken against President Guaido, members of the National Assembly, and peaceful protestors," he added in a statement.

CLICK HERE TO GET THE FOX NEWS APP

Maduro has accused the opposition of inciting violence with the aim of provoking a bloodbath. Top socialist leaders have threatened to unleash on demonstrators menacing motorcycle gangs of pro-government die-hards known as "colectivos."

"I demand the full rigor of the law against the fascists," Maduro said Tuesday night, blaming what he called "terrorists" allegedly linked to Guaido's Popular Will party for a fire at a cultural center named for a pro-government lawmaker murdered in 2014.

Since 2015, oil-rich Venezuela has been gripped by a mass shortage in medicine, food and bewildering hyperinflation, which has exceeded one million percent, according to the International Monetary Fund, rendering the currency - the Bolivar - essentially worthless. Almost four million people are estimated to fled Venezuela in desperation, creating a mass migration crisis across much of Latin America.

The Associated Press contributed to this report.