BP must pay more than 130 million dollars (£84 million) in fees to the administrator of its multibillion-pound settlement with US Gulf Coast businesses and residents after the company's 2010 oil spill.
The ruling from US District Judge Carl Barbier comes as BP tries temporarily to block claims payments while former FBI Director Louis Freeh investigates allegations of misconduct by a lawyer who worked on the settlement programme.
BP has also complained of broader problems in the programme run by court-appointed claims administrator Patrick Juneau.
The dispute over Mr Juneau's administrative expenses is just the latest chapter in BP's increasingly aggressive campaign to challenge his handling of the claims process.
Separately, the company has accused him and Mr Barbier, who is overseeing the oil spill settlement, of misinterpreting it in a manner that could force the company to pay billions of pounds in what it says are inflated and fictitious claims by businesses.
In his ruling, Mr Barbier said Mr Juneau needs to submit his budget proposals earlier than he has been. But he concluded that BP's refusal to pay for the settlement programme's third-quarter budget was not reasonable. "My primary concern is that we don't allow these issues to cause a shutdown of the claims facility," Mr Barbier said.
His ruling upheld that of US Magistrate Sally Shushan, who earlier ordered BP to pay the fees after hearing arguments by a company lawyer, Mr Juneau and one of the private plaintiffs' lawyers who brokered the deal. When BP appealed against Ms Shushan's decision, Mr Barbier summoned the parties to his courtroom for another hearing.
In a letter on Monday, BP claims official Maria Travis said Mr Juneau's office has not provided adequate documentation for the money it requested. She also alleged that the programme has been plagued by poor productivity and excessive costs.
Ms Shushan said that while the dispute over claims documentation was regrettable, there was no way she could cut off funding for administration of the programme on such short notice. "People are dependent. Jobs are dependent. We just can't have that happen," she said.
BP lawyer Keith Moskowitz said it is "patently unreasonable" to expect BP to pay more than 130 million dollars without a more detailed budget proposal from Mr Juneau.