Mr Pena Nietos six-year term began in December 2012
Mexican President Enrique Pena Nieto has signed a controversial law that allows foreign companies to drill for oil for the first time since the sector was nationalised in 1938.
The legislation was passed by Congress on 13 December and ratified by a majority of Mexican states.
President Pena Nieto says the reform will help Mexico attract the investment needed to boost its falling oil output.
The opposition says it damages national interests.
The legislation changes three articles in the Mexican constitution and allow foreign investment in oil, gas and electricity.
Private companies will be allowed to sign contracts to drill for oil and gas with state-controlled firm Pemex, which will get a share of the profits.
This is the beginning of a new history for our country. We have opened the doors for a better future for all, said Mr Pena Nieto.
Oil production in Mexico has dropped from 3.4 million barrels per day in 2004 to the current rate of 2.5 million barrels per day.
Opposition legislators attempted to stop last weeks vote by all means, including piling up chairs to block the entrance to the Congress building.
MP Antonio Garcia took off his clothes in Congress to denounce the stripping of Mexicos oil wealth.
Police block protesters from Zocalo Square, Mexico City. 20 Dec 2013Riot police blocked protesters from reaching the centre of Mexico City as the law was signed
It was passed by the Senate and approved by the lower house of Congress, the Chamber of Deputies, a day later.
Politicians from the conservative National Action Party joined forces with the governing Institutional Revolutionary Party (PRI) to defeat the opposition.
The legislation was then ratified by 24 out of 32 Mexican federal entities (31 states and the Federal District).
Mr Pena Nieto will now send a new set of secondary bills to Congress to implement the energy reform.
This year we, Mexicans, have decided to overcome myths and taboos in order to take a great step towards the future, he said.
Mr Pena Nieto took office in December 2012 promising to review the anti-drugs policies of his predecessor, Felipe Calderon, and to boost the countrys economy.
Mexican oil workersThe Mexican oil sector was nationalised in 1938 by President Lazaro Cardenas, who said the country had the right to its mineral wealth