Pemex is the Mexican state-owned petroleum corporation managed and operated by the Mexican government. It was formed in 1938 by nationalization and expropriation of all private oil companies in Mexico at the time of its formation.