Some 40,000 teachers, union members and anarchist activists took to Mexico City's streets Sunday in a demonstration on the first anniversary of President Enrique Pena Nieto's inauguration.

The protesters joined a rally held by Pena Nieto's former rival Andres Lopez Obrador of the Party of the Democratic Revolution.

"We are here to avoid a big robbery," Lopez Obrador told the crowd.

One group of protesters held a massive banner declaring "NO to the sale of Pemex," the state-owned energy company.

Another protester carried a sign in English telling Pena Nieto's party to "Sell your body. It's yours. The oil is mine."

"Injustice," others read, declaring that "Mexico is not in mourning, it is pissed off!"

Pena Nieto has sought to focus on bolstering the economy since coming to power December 1, 2012, pledging a series of structural reforms and signing a "Mexico Pact" with the main opposition parties.

Pena Nieto said his government has "made the adoption of the reforms a top priority," promising that they will help boost the country's economic growth.

But the reforms have sparked strong opposition from leftist groups.

Earlier this week, Lopez Obrador's party announced that it would split with the Mexico pact unless the government changes its planned energy reforms -- one of which includes raising money for Pemex with foreign partners for high-cost, super-deep oil exploration beneath the Gulf of Mexico.

State oil giant Pemex generates more than a third of the money that funds the government's budget.

Its output has slid from 3.4 million barrels per day in 2004 to 2.5 million in 2012.