Ghana gets around 25 percent of its power through gas from Nigeria.
Ghana's government said it will pay a Nigerian gas consortium $170 million it owes by February, apparently resolving a dispute that led the consortium to threaten to cut its supply.
Ghana's state power generating company, the Volta River Authority, will settle the debt to Nigeria's N-Gas in three tranches starting in November, said Kweku Sersah, a spokesman for Ghana's Ministry of Power.
He said that the terms were still being finalised.
"The high-powered delegation that went ... (to the Nigerian capital Abuja) was able to negotiate for Nigeria Gas (N-Gas) to continue to supply the country the needed gas," Sersah said in a statement posted on the ministry's Facebook page.
Ghana's government has promised to end crippling power blackouts by the end of the year.
Ghana gets around 25 percent of its power through gas from Nigeria. The threat by N-Gas to reduce supplies by 70 percent would have made it harder to achieve the government's goal of tackling blackouts and could have raised the cost of supply.
The issue is sensitive in the run-up to Ghana's election next year that is expected to be closely fought. Power cuts have angered voters and come on top of a sharp slowdown in the economy, which for years was one of Africa's strongest.