* First major private investment since YPF re-nationalized
* Argentina changed regulations on Monday to lure shale investment
By Alejandro Lifschitz and Karina Grazina
BUENOS AIRES, July 16 (Reuters) - U.S. oil company Chevron Corp signed an agreement with Argentina's YPF on Tuesday to invest $1.24 billion in the Vaca Muerta shale oil and gas formation, thought to be one of the biggest reserves in the Western Hemisphere.
It is the first major investment announced in Argentina's petroleum sector since President Cristina Fernandez ordered the seizure of YPF from Repsol in May 2012, claiming the Spanish group had not invested enough in Argentina.
The country is trying to reverse a long decline in natural gas and oil output that has hurt its trade surplus.
The two companies plan to drill 100 wells in an area of 20 square kilometers (5,000 acres), known as Loma La Lata Norte and Loma Campaña in an initial development phase, according to statements from YPF and Chevron.
Chevron said Loma La Lata field is now producing more than 10,000 barrels of oil-equivalent per day. A second phase of the development will require the drilling of 1,500 wells.
On Monday, Argentina's government published a decree to allow oil companies to export, tax free, up to 20 percent of the crude and natural gas they produce in the country, paving the way for the Chevron deal.
Companies that explore Vaca Muerta and export from the field will also be allowed to keep their earnings in foreign exchange outside the South American country, a benefit denied to other companies, which are required to repatriate their earnings.
Local firm Bridas Energy also signed a preliminary deal with YPF to drill in Vaca Muerta, but Chevron is the first company to finalize investment plans.
Repsol has brought suit against YPF, Bridas Energy and Chevron in Madrid, where a judge will decide whether YPF's deal with Chevron should be frozen.
Chevron has several high-profile legal battles in South America, including its year-long tussle in Brazil following an offshore oil spill there and a two-decade international fight over rainforest pollution in Ecuador.
Some 40 Mapuche Indians staged a protest against Chevron's involvement in Vaca Muerta earlier on Tuesday.
In case of any local legal challenges, YPF and Chevron have agreed to go to court in the United States rather than in Argentina, according to a source familiar with the contract.
A U.S. Department of Energy report has shown Argentina holds more natural gas trapped in shale rock than all of Europe - a bounty estimated at 774 trillion cubic feet, the bulk of it located in Vaca Muerta.