Bolivia's President Evo Morales has signed a decree placing his country's energy industry under state control.
Bolivians celebrate after Mr Morales' announcement
In a May Day speech, he said foreign energy firms must agree to channel all their sales through the Bolivian state, or else leave the country.
He set the firms a six-month deadline, but the military and state energy officials have already started taking control of the oil fields.
Brazil and Spain have both expressed concern at the move.
The main foreign oil firms operating in Bolivia are Brazil's Petrobras, the Spanish-Argentine company Repsol YPF, British companies British Gas and British Petroleum, France's Total, and the US Exxon Mobil Corporation.
The Brazilian government called the moves unfriendly and said their operations in Bolivia were under review.
The Spanish Foreign Ministry expressed its deep concern and said it hoped there would be authentic negotiations and dialogue, while Exxon Mobil said it was monitoring the situation very closely.
Bolivia has South America's second largest natural gas reserves.
But the country has suffered years of political crises over how to develop and profit from the industry.
High energy prices
Speaking at an oilfield in the south of the country, Bolivia's left-wing president called it an "historic day".
"The pillage of our natural resources by foreign companies is over," he declared.
He said the companies had six months to re-negotiate their contracts and urged them to "respect the dignity of Bolivians".
Foreign companies would receive 18% of oil and gas revenues during the transition period, reports said.
Vice President Alvaro Garcia said the military and officials from the state energy firm YPFB moved to take control of 53 energy installations - including gas fields, pipelines and refineries - immediately after the decree was signed.
There was no immediate word from the foreign energy companies themselves.
The firms will get less favourable terms but current high global energy prices may be an incentive to see if they can work with Mr Morales, the BBC's Americas editor Simon Watts says.
Mr Morales swept to victory as Bolivia's first indigenous president in January elections after vowing to "recover" the country's natural resources by renationalising them.
However, he has shown signs of pragmatism since coming to office, and has held friendly meetings with several oil bosses.
On a visit to Brazil in January he said renationalising the industry would not mean expelling foreign companies or expropriating foreign property.
"Foreign companies have every right to recover investments and make profits, but profits should be balanced," he told a press conference at the time.
Petrobras is one of Bolivia's largest foreign investors, controlling 14% of the country's gas reserves.