Mexican President Andres Manuel Lopez Obrador speaks during a press conference at the National Palace, in Mexico City, capital of Mexico, on June 3, 2019. (Xinhua/Francisco Canedo)

Mexican President Andres Manuel Lopez Obrador said Sunday that former Bolivian leader Evo ­Morales was the “victim of a coup d’état.”

The leftist president, nicknamed AMLO, celebrated his first year in office with a speech to throngs of supporters in Mexico City.

While detailing budget and tax policies, and the ongoing fight against corruption, Lopez Obrador touched on Mexico’s foreign policy by recalling his government’s decision to accept Morales as an asylum seeker.

“Evo was the victim of a coup d’état! And from Mexico, we tell the world, ‘Yes to democracy, no to militarism!'” Lopez Obrador said during the rally in the central Plaza del Zocalo.

The square was packed with people, and musical groups performed alongside Lopez Obrador’s speech.

It also marked the first time that Lopez Obrador, who has been in office for a year, spoke directly about the ­circumstances that led to ­Morales’ departure from Bolivia.

Morales resigned on November 10 amid swelling protests over what political opponents said was his rigging of October 20 elections.

He fled to Mexico the following day after losing the support of the military and police, claiming to be the victim of a coup.

While echoing Morales’ claim on Sunday, Lopez Obrador called the exiled leader “our brother, who represents with dignity the majority of indigenous people of Bolivia.”

Morales has yet to meet publicly with Lopez Obrador. He was welcomed on arrival to Mexico by Foreign Minister Marcelo Ebrard.

Lopez Obrador’s one-year anniversary was marred by a shootout Saturday afternoon near the US border between suspected drug traffickers and police, leaving 20 dead.

Shooting continued into ­early Sunday, and authorities said that four of those killed were police, 14 were suspected criminals and another three bodies were unidentified.

The shootout came after Lopez Obrador warned he would not allow the US to conduct cross-border armed operations against drug cartels in the country.