Image caption YPF announced a huge shale oil find in Argentina last November

Argentina says it will seize a controlling interest in oil company YPF that is owned by Spanish firm Repsol.

President Cristina Fernandez said a bill would be presented to the Senate allowing the government to expropriate 51% of YPF shares.

The move, announced on national television, was welcomed by her cabinet and Argentina's regional governors.

Spanish Foreign Minister Jose Manuel Garcia Margallo said the action had "broken the climate of friendship".

Speaking after a government crisis meeting, Mr Margello told journalists his government would take "clear and forceful measures", although he did not specify what these would be.

In a statement Repsol said it "considers the announced measure to be manifestly unlawful and gravely discriminatory".

Speculation has grown in recent weeks that Argentina was planning to force through a bigger state role in the firm.

Spain and the EU had already expressed concern at such a state takeover of YPF, in which Repsol has a 57.4% stake.

Sustained criticism

Announcing the move, President Fernandez said energy was a "vital resource". Of the seized shares, the state will hold 51% and the country's oil-producing provinces will get 49%.

Shares in YPF fell around 18% on Wall Street following the announcement.

YPF has come under sustained criticism from the Buenos Aires government.

The authorities in Argentina have accused YPF of not investing enough to increase output from its oilfields, and so lessen the need for imports, an accusation it rejects.

The company has been stripped of a number of leases, including in some of the biggest oil fields in the country.

Analysis YPF is not the first big firm to be nationalised by President Cristina Fernandez and it is unlikely to be the last. Ms Fernandez has continued the economic nationalism of her late husband and predecessor, Nestor Kirchner, bringing such companies as the national airline under renewed state control. Like Aerolineas Argentinas, YPF was privatised in the 1990s by former President Carlos Menem, a man who transformed the Peronist party into an engine of free-market reform. But since Argentina's economic collapse of 2001-02, Peronism has gone back to its original corporatist vision, and many sectors of the economy that were liberalised in that era are now back in government hands.

Spain has previously warned Buenos Aires that a takeover of YPF could have consequences for Argentina's international image.

And on Monday, Spain's ruling People's Party said the government would defend national interests.

"The government has to decide on its response, but I don't have the slightest doubt that it will be the most appropriate response to defend national interests and Spanish interests and a sufficient and complete response to defend the interest of Spanish companies in Argentina," said the general secretary of the party, Maria Dolores Cospedal.

The European Commission, the EU's executive arm, has made it clear it backs Spain's position.

In November last year, YPF, which was privatised in 1993, announced a major find of one billion barrels of shale oil.

Argentina has some of the world's largest reserves of shale oil and gas.

It is ranked number three in the world in terms of recoverable resources, behind China and the US, according to the US Energy Information Administration.