A Spanish delegation says it has reached a "good understanding" with Bolivian President Evo Morales over his energy nationalisation programme.
All gas production in Bolivia will now be in state hands
The issue matters to Spain because of the huge Bolivian gas reserves controlled by Spanish firm Repsol.
But Spain's Deputy Foreign Minister, Bernardino Leon, said he respected Bolivia's decision to nationalise.
He said Spanish firms would have to decide whether to stay in Bolivia under the new terms.
Earlier this week Mr Morales took control of Bolivia's natural gas industry and told foreign firms to leave if they were not willing to comply with the new conditions.
The Bolivian government has said it will start renegotiating energy contracts with all foreign companies from next week, giving them 180 days reach agreement, or face eviction.
In the meantime, the government will take 82% of profits.
Prior to nationalisation, Repsol controlled about a quarter of Bolivia's gas reserves, after investing $1.2bn in the country.
After meeting Mr Morales, Mr Leon said the parties had opened "a dialogue and negotiations that will affect both governments and companies, such as Repsol, on the basis of the decisions that have been made in the past few days".
Whether to continue operating in Bolivia was "a decision that belongs to the companies themselves", he added.
At an emergency regional summit on Thursday, Mr Morales moved to address the concerns of Brazil and Argentina by guaranteeing a continuing supply of gas and discussion of a reasonable future price.
Brazil and Argentina rely on cheap gas imports from Bolivia and fear that nationalisation could push prices up.