Bolivia has agreed energy deals with 10 foreign gas and oil firms, just before a deadline for foreign firms to agree new contracts or leave the country.
Some deals were signed with only minutes to go before the deadline
Brazil's Petrobras and Spain's Repsol were among eight to reach agreement on Saturday, after two deals on Friday.
The contracts come after President Evo Morales nationalised the oil and gas industry in May to give the state more control and a larger slice of profits.
He said that now Bolivia would no longer be "a beggar state".
"We will continue in this path of recovering our natural resources," said Mr Morales, "not only the hydrocarbons but... all non-renewable natural resources that belong to the Bolivian people."
Under the terms of the president's 1 May decree, foreign companies had six months to sign contracts giving up majority control of their Bolivian operations.
The companies will also have to work in partnership with the re-founded Bolivian state energy firm, Yacimientos Petroliferos Fiscales Bolivianos (YPFB).
COMPANIES SIGNED UP
Petrobras (two branches)
The BBC's Damian Kahya in La Paz says a deal with Petrobras - the largest foreign investor in the industry - came as a significant boost for Mr Morales as the Brazilians have invested more than $1bn in Bolivian gas.
However, Petrobras and the Brazilian government had been angered by the way the Bolivians conducted negotiations, accusing them of bullying, our correspondent says.
Deals with seven more firms, including the second largest investor Spain's Repsol and the UK's BG Group, were announced a few hours' before the deadline expired.
Details of the contracts signed on Friday are not yet available, but the president of YPFB, said they would bring Bolivia $120m (£63m) in annual gas revenues.
The negotiation process has not been simple. Talks were dealt a blow in September when Andres Soliz Rada, a main player in the nationalisation process, resigned as energy minister.
Mr Soliz had clashed with state-owned Petrobras, the biggest investor in Bolivia's energy industry.
However, Mr Rada was replaced by Carlos Villegas, and talks proved to be more fruitful.
There were other problems including a lack of money that hampered Bolivia's YPFB, in its plans to buy control of the assets like refineries and pipelines.
YPFB also missed a 1 July deadline to restructure itself so it would be better able to handle its more dominant position in the oil and gas industry.