Oil major Repsol warned it could take legal action against companies that invest in YPF after Argentina seized control of the Spanish company's energy unit last week.

Argentina expropriated the 51 percent of YPF owned by Repsol, saying that the company needed to invest more to address the South American country's energy shortage.

Argentine Planning Minister Julio De Vido approached Brazil's state-run oil company Petrobras over investment in YPF last week.

Argentine officials met executives from ConocoPhillips earlier on Monday to discuss potential investments, a Planning Ministry statement said. Company executives left the meeting without talking to reporters.

Vido said last week he would make contact with foreign oil companies, such as ConocoPhillips, Exxon , and Chevron to seek to attract more investment in oil.

Repsol reserves the right to take legal action against companies' investment in YPF, a Repsol spokesman said on Monday.

Argentina needs hefty foreign investment to help develop its shale gas reserves, the third largest in the world.

European, U.S. and Mexican officials have all criticized Argentina's expropriation of YPF, the country's biggest oil company, but the effects of retaliation may be limited as Argentina in the past has failed to pay settlements stemming from international trade disputes.

The only concrete measure Spain has taken so far was to curtail multimillion-dollar imports of biodiesel from the Latin American nation.

In Luxembourg, Spanish Foreign Minister Jose Manuel Garcia-Margallo met his European Union counterparts on Monday and discussed potential measures against Argentina, which has said it will not pay Repsol the full price for YPF.

The minister said he had discussed measures such as ending trade benefits to Argentina and had received support from his counterparts.

However, Margallo said the government wanted to negotiate with Argentina's government. We keep saying that the best thing that could happen is for us to reach a negotiated solution...and we have asked some of our European and Latin American partners to act as intermediaries in this matter to avoid a dispute, a clash which is bad for Spain, Argentina and Europe, he said.

Earlier on Monday, a source told Reuters Spain considered restricting Argentine soybean meal imports last week to retaliate against the South American country's seizure of Spanish-owned energy company YPF , but rejected the move in the end.

Argentina is the world's third biggest exporter of soybean meal, which is an essential source of protein in animal feed, and Spain is Europe's biggest pig feed producer.

The European Parliament on Friday urged the executive European Commission to consider reprisals against Argentina, although it would need backing from European Union countries and the World Trade Organisation to do so.

No swift action by the EU against Argentina is expected, as Europe's trade ministers would also have to consider any proposals and, ultimately, it would be up to the European Commission to decide on sanctions.

Karel De Gucht, the European Union's trade commissioner, wrote to Argentina last week to express the bloc's serious concerns about the overall business and investment climate in Argentina, singling out the YPF takeover and import curbs for criticism.

The EU keeps open all possible options to address this matter, his letter read.

Also last week, the European Parliament urged the Commission to consider reprisals such as the suspension of trade benefits, mirroring a recent decision by Washington.

(Reporting By Fiona Ortiz, Tracy Rucinski, Martin Roberts and Sarah Morris; Editing by David Cowell and Carol Bishopric)