By Diego Oré
CARACAS (Reuters) - Venezuela's opposition takes control of Congress for the first time in 16 years on Tuesday, setting up a power struggle with President Nicolas Maduro amid a worsening economic crisis.
The Democratic Unity coalition won a two-thirds majority in December's legislative election by capitalizing on anger over a shrinking economy, soaring prices and chronic product shortages reminiscent of Soviet-bloc economies.
The coalition plans to swear in all of its 112 elected deputies but the Supreme Court has ruled that three of them cannot take office because their election victories face legal challenges.
The opposition dubbed the ruling a "judicial coup" meant to strip it of its two-thirds majority in the National Assembly.
"We've come because Venezuela is celebrating. Today democracy returns to our country," said Milagros Hernandez, 58, a housewife who joined an opposition rally in downtown Caracas.
Police and National Guard troops were deployed in the area around the National Assembly to prevent violence between opposition sympathizers and Maduro supporters, who have in the past clashed amid political tensions.
Opposition leaders accuse the government of undermining the incoming assembly with last-minute appointments of Supreme Court justices and by changing a central bank law to eliminate congressional control over the bank's leadership. [L1N14O2B8]
A portrait of late President Hugo Chavez that hung prominently in the main congressional chamber, a symbol of what critics call illegal politicization of public institutions, was removed.
Television images showed smiling opposition deputies chatting in the company of reporters, who for years have been blocked from the floor of Congress by the Socialist Party leadership.
Maduro has recognized the results of the election, but has dismissed the new assembly as "right-wing" and "bourgeois," and accuses the opposition of preparing to privatize state-run companies and roll back social programs.
"Chavez leads in heaven and Nicolas leads on earth," chanted Maduro supporters who gathered in a plaza adjacent to the National Assembly.
The main item on the agenda is the election of the assembly's speaker. The opposition has tapped veteran legislator Henry Ramos for that post.
The Supreme Court in late December granted injunctions that blocked four deputies - three from the opposition and one allied with the government - from taking office after losing Socialist Party candidates filed legal challenges to the results.
The court did not describe the underlying arguments against the election of the deputies, all of whom are from the rural and sparsely populated southwestern state of Amazonas.
Disputing all the results in that state required the Socialist Party to contest the seat won by its own candidate.
Opposition lawyers say the ruling is "incoherent" and insist it cannot take precedence over election results.
But former Supreme Court justice Luis Martinez on Monday warned that swearing in the blocked deputies could allow the Socialist Party to argue that Congress has been illegally constituted and thus its decisions are null and void.
The Dec. 6 election gave the opposition its most decisive victory since Chavez took power in 1999. His generous spending of oil revenue made him nearly invincible at the polls during his 14-year rule.
Maduro, a former bus driver and Chavez's anointed successor, has struggled since his election in 2013 to match the latter's charisma. His government has repeatedly balked at implementing broad economic reforms despite promising them.
Although the opposition's victory was driven by anger over the economy, it has few options to resolve the crisis because Maduro's government handles economic policies.
Opposition lawmakers have instead promised to take up an amnesty law seeking the freedom of opposition activists jailed for protesting against Maduro, and a measure to grant property titles to those who received homes from the government.
(Additional reporting by Alexandra Ulmer; Editing by Girish Gupta, Kieran Murray and Alistair Bell)