Repsol, YPF and Mexico's Pemex state oil company, which holds a stake in Repsol, said they agreed tentatively on a process for determining a compensation amount. The parties also agreed to suspend legal actions.
Argentina expropriated the Spain-based Repsol's controlling stake in YPF on April 16, 2012, without paying a single cent. The government claimed Repsol was not investing enough in the South American country's oil industry.
The recovery of Argentina's national oil company, which was privatized in the 1990s, was hugely popular among Argentines because many blame the privatizations and other free-market policies of that decade for the country's economic crisis and debt default in 2001-2002.
But the seizure infuriated Spain and led to criticism by the European Union, the United States and even some Latin American leaders.
The Spanish energy giant has been demanding $10.5 billion in compensation and had sued Argentina seeking payment.
The preliminary deal was reached after company and government officials from Argentina, Spain and Mexico met in Buenos Aires. No other details of the agreement were released and it must be ratified during a Repsol board meeting Wednesday.
If confirmed, it could pave the way for Pemex to join the exploration of the vast Vaca Muerta (Dead Cow) oil deposit in Neuquen province, where YPF says 15 teams are already extracting more than 10,000 barrels a day.
Argentina has the world's third-largest deposits of shale oil and gas and needs international help to develop them. But only a couple of major oil companies have made commitments since Repsol threatened to sue Chevron and any other company that worked with YPF on the fields that were discovered when Repsol had a controlling stake in YPF.