The Spanish government has given approval to Gas Natural's 22.4bn euro ($27bn; £15bn) hostile takeover of fellow Spanish energy company Endesa.
The merger will create the world's third largest energy company
Gas Natural's approach for electricity firm Endesa had already been approved by Spain's energy industry watchdog.
Combined, they create the world's third biggest energy firm.
Endesa has strongly opposed the deal, but Spain's government has a policy of promoting industry consolidation to create "national champions".
Madrid hopes that such larger firms will be better able to compete on the global stage.
Outside of Spain both companies have large operations in Latin America.
"The success of the transaction will produce increased competition and, as a result, an increase in the quality of the service and a reduction in prices," said Spain's Deputy Prime Minister Maria Teresa Fernandez de la Vega.
"The deal is in Spain's interest because the company that will be formed by the merger will be one of Europe's biggest companies.
"Not only does it not damage competition, it fosters it."
However, the approval is subject to conditions, and the combined group will have to shed 4,300 megawatts of electricity generating capacity.
Gas Natural will also have to sell all but 1% of its 15% stake in gas distributor Enagas.
Endesa shareholders will now discuss the Gas Natural offer at their annual general meeting on 24 February.
They will vote on the deal at an extraordinary general meeting at a later date.