Mexico's Foreign Minister Marcelo Ebrard looks on during a news conference in Mexico City, Mexico December 19, 2018. REUTERS/Edgard Garrido

MEXICO CITY (Reuters) - Mexico’s government said on Tuesday it is not defending Venezuela’s President Nicolas Maduro after European nations, the United States and others recognized opposition leader Juan Guaido as the South American country’s legitimate head of state.

“We don’t defend Maduro or his regime, nor are we taking a political position, we want there to be dialogue,” Foreign Minister Marcelo Ebrard said in an interview with local television. “We’re not taking sides, everyone can have their point of view.”

Major European countries on Monday joined most members of the Lima Group, including Argentina, Brazil and Canada, supporting Guaido as interim Venezuelan leader and calling for free elections.

Mexico was once an outspoken critic of Maduro. But ties with Venezuela have warmed under leftist President Andres Manuel Lopez Obrador, who invited Maduro to his inauguration last month.

Lopez Obrador’s government has said it is following a policy of neutrality and non-intervention.

Maduro’s government, overseeing an economic collapse that has prompted 3 million Venezuelans to flee the country, lashed out at the EU nations, saying their move would affect relations with Caracas.