Madrid (AFP) - Hundreds of Venezuelans rallied in central Madrid late Tuesday in support of their country's self-proclaimed leader Juan Guaido, as riots broke out in faraway Caracas.

Venezuelan President Nicolas Maduro and his government have vowed to put down what they see as an attempted coup by the US-based opposition leader.

But as police fired tear gas at the crowds in Caracas, around 300 people gathered in the Puerta del Sol square in Madrid in support of the 35-year-old National Assembly leader, waving Venezuelan flags and brandishing banners with slogans such as "Maduro is destroying Venezuela".

"This isn't a state coup," a former mayor of Caracas and opposition politician, Antonio Ledezma, told the small crowd in the Spanish capital, which included Venezuelan opposition figures, as well as officials from Spain's conservative Popular Party and centre-right Ciudadanos.

A spokeswoman for the Spanish government had earlier said Madrid "strongly hope(d) that there will be no bloodshed" in Venezuela.

Spokeswoman Isabel Celaa called for "democratic elections" and said Madrid supports a "peaceful" outcome to the Venezuela crisis.

Spain has thrown its support behind Guaido, whom it recognises as interim leader of economically-strapped Venezuela over President Nicolas Maduro.

Separately, Air France on Tuesday said that a passenger plane en route to Caracas was returned to Paris's Charles de Gaulle airport due to "events in Venezuela".

"After analysing the situation, it was decided that flight AF368 should return to Paris-Charles de Gaulle," said an airline spokesman, adding that it was "monitoring the situation in real time" and would inform passengers of any future flight changes.