RIO DE JANEIRO — Argentina’s president, Cristina Fernández de Kirchner, announced on Monday that the government would seize a majority stake in YPF, the nation’s largest oil company.

The expropriation would reassert state control over an important pillar of Argentina’s economy, but it has already increased diplomatic tensions with Spain and the European Union. Mrs. Kirchner quickly ousted Sebastián Eskenazi as YPF’s chief executive, naming two top aides, Julio de Vido and Axel Kicillof, to run the company.

Under Mrs. Kirchner’s plan, which she announced on national television, Argentina’s government would take a 51 percent controlling stake in YPF, which is now majority-owned by a Spanish energy company, Repsol YPF. Of that new stake, Argentina’s central government would get 51 percent and the country’s provinces 49 percent. The plan is part of a bill submitted to Argentina’s Congress that is widely expected to be approved.

The Spanish government repeated its earlier pledge to retaliate, though it did not specify how. Following an emergency cabinet meeting in Madrid on Monday evening, José Manuel García Margallo, the Spanish foreign minister, said that Madrid “condemned with the utmost energy” Argentina’s move, adding that it “broke the climate of cordiality and friendship that presided over relations between Spain and Argentina.” The European Union also criticized the plan.