(Adds details on dispute between Petrobras and Eletrobras)
SAO PAULO, May 30 (Reuters) - A Brazilian court ordered state-controlled oil firm Petróleo Brasileiro SA to sell natural gas to Centrais Elétricas Brasileiras SA despite the power utility's billionaire debt with the oil company.
Eletrobras, as the state-controlled utility is known, plans to use the gas to begin testing a thermal power station under construction in the Amazon region that is scheduled to start operating in June.
Reuters had reported on Feb. 22 that Petrobras had refused to supply natural gas to test the so-called Mauá 3 plant because Eletrobras and some of its subsidiaries did not pay several billion reais for fuel supplies.
The 590-megawatt Mauá 3 thermal plant is close to completion, but is at risk of not getting the gas to run on.
Petrobras will now be forced to sell enough natural gas to allow the testing to take place, the oil firm said in a statement to Reuters, but not the amount needed for the plant to fully operate.
In its first-quarter financial statements, Petrobras said Eletrobras owed Petrobras 9.8 billion reais ($3 billion), of which 8.2 billion reais stemmed from the power firm's subsidiary in the Amazon region.
A media representative for the subsidiary Eletrobras Amazonas Energia said the parties were in talks and that it would comment on the court dispute "in a timely manner." ($1 = 3.2603 reais) (Reporting by Luciano Costa and Bruno Federowski; editing by Grant McCool)