By Diego Oré and Brian Ellsworth

CARACAS (Reuters) - Opponents of President Nicolas Maduro flooded Venezuela's capital on Thursday in one of the biggest mass protests against socialist rule for more than a decade.

Dressed in white and chanting "this government will fall," hundreds of thousands rallied across Caracas to demand a recall referendum against Maduro and decry a deep economic crisis in the South American OPEC nation.

The opposition Democratic Unity coalition estimated at least 1 million people took part after protesters streamed into Caracas from the Amazon jungle to the western Andes.

"We are going to bring down Maduro!" said Naty Gutierrez, 53, whose 75-mile (120 km) drive from Maracay into Caracas took three times longer than usual due to soldiers' roadblocks.

"We are going to defeat hunger, crime, inflation and corruption. They've done nothing in 17 years. Their time is finished," she said, surrounded by thousands of people waving banners and national flags at one gathering point. The government, which mounted its own, smaller counter-protest, did not give numbers for the turnout.

The opposition hoped its protests would prove they are the majority and heap pressure on Maduro and the national election board to allow a plebiscite on his rule, as allowed by the constitution half-way through a presidential term.

But with the election board dragging its feet over the process and the government swearing the referendum will not happen this year, the opposition has no way to force it no matter how many people it brings onto the streets.

The timing is all-important because if a plebiscite were held in 2017 and Maduro lost, his handpicked vice president would take over for the ruling Socialist Party, rather than triggering a new presidential election.

In power since Hugo Chavez's presidency from 1999, the socialists have hit a low ebb as falling oil prices and a failing state-led economy have left the country in turmoil.

Triple-digit inflation, a third year of recession, shortages of basics, and long lines at shops have exasperated many of Venezuela's 30 million people. The frustration led to a resounding opposition win in a December legislative vote.

Story continues

"READY FOR EVERYTHING"

Maduro, 53, denounced what the opposition had billed as the "Takeover of Caracas" as a front for coup plans, akin to a short-lived 2002 putsch against his mentor Chavez, who died of cancer three years ago. Maduro has failed to replicate his charismatic predecessor's popular appeal, and his ratings in opinion polls have halved to just over 20 percent.

"We have stopped the coup today, the violent, fascist ambush," Maduro told supporters, saying detentions of activists in recent days had prevented violence. At least a dozen opposition campaigners were still in custody on Thursday, according to rights groups and the opposition.

Extra police and troops were positioned around Caracas, and there were roadblocks on most major routes into the capital from the provinces, with buses being blocked and traffic crawling.

"All they are interested in is staying in power," said construction worker Luis Palacios, 59, from the poor Caracas neighborhood of Petare. "We want change, we are hungry."

After the main events had finished peacefully, a small group of youths, many covering their faces, hurled stones and petrol bombs at security forces who fired back teargas during a standoff on a highway in Caracas.

The opposition Democratic Unity coalition said the youths were infiltrators trying to sow trouble.

Fearing violence, especially given 43 deaths around anti-Maduro protests in 2014, many businesses in the capital had stayed closed. Dozens of indigenous people marched hundreds of miles from their home state of Amazonas.

Swearing loyalty to Chavez's legacy and calling opposition leaders a wealthy elite intent on controlling Venezuela's oil, thousands of red-shirted government supporters also gathered for counter-rallies.

"The opposition want to topple the president, but they won't be able to," said lawyer and civil servant Adriana Jimenez, 44, at one such rally close to a huge inflatable puppet of Chavez in downtown Caracas.

Like other "Chavista" loyalists, she blamed Venezuela's ailing economy on an "economic war" by businessmen hiking prices and hoarding goods.

Maduro joined his supporters in the afternoon, singing on stage and pumping his fist in the air.

The opposition called a nationwide protest of banging pots and pans for mid-evening, and announced a timetable for further rallies in coming weeks.

(Additional reporting by Daniel Kai, Girish Gupta, Eyanir Chinea, Andrew Cawthorne and Corina Pons; Writing by Andrew Cawthorne; Editing by Tom Brown and Frances Kerry)