(Adds origin of debt, calculations for total)
SAO PAULO, April 22 (Reuters) - Brazil's government will pay debt it owes to energy transmission companies starting in 2017, the country's official gazette said on Friday, a surprise decision that sent shares of energy companies soaring.
The debts stem from changed energy policy four years ago. In March, the government said it would only start repaying them in 2019 because it did not want to further raise prices for consumers.
Energy prices surged last year, boosting inflation and denting consumer purchasing power during Brazil's deepest recession in decades.
It was not immediately clear how much consumer tariffs would be increased as a result of Friday's decision.
The news that the timeline had been brought forward rallied shares in Cteep and state-run Eletrobras, which each rose 10 percent in morning trade.
The debt, which runs into billions of dollars, stems from a government decision in 2012 to force utilities to reduce the price they sell energy to consumers. As compensation for this, the government offered to pay off outstanding debts the companies had accrued by building transmission lines.
But these payments have still not been made.
The National Electric Energy Agency (Aneel) calculates Cteep is owed 3.9 billion reais ($1.1 billion), while Eletrobras through subsidiaries Furnas and Eletrosul is owed 10 billion reais. (Reporting by Luciano Costa; Writing by Caroline Stauffer and Stephen Eisenhammer; Editing by David Gregorio)