The most contentious of the three was Whitefish Energy, a small Montana firm that appeared to get a major contract out of nowhere, with few employees and very little experience of large-scale work. The fact that the secretary of the interior’s son had been an intern at the company prompted accusations of insider dealing, and the company was criticized for charging more than $300 an hour for each lineman it deployed.

Mr. Ortiz said that Prepa was waiting for an opinion from FEMA’s inspector general before paying $104 million in outstanding bills the company has submitted.

The company said it feels vindicated, because Prepa records posted online show that Whitefish fixed five transmission lines and completed other tasks for a total of $140 million. The Prepa records indicate that other companies billed far more and took longer to complete their projects.

Earlier this year, a FEMA official publicly praised the work Whitefish had done. By contrast, Prepa has grumbled about the slow pace of work done by Fluor, a major contractor brought in by the Army Corps of Engineers.

Things went just as badly for the local companies that worked on the grid, several of which went out of business.

“It bankrupted us,” said Francisco Lasanta, the owner of SM Electrical, a Ponce company that estimates it is owed about $2.3 million from both Prepa and contractors who were also not paid. “The company is going to disappear.”

Records filed in federal court show at least 20 local companies were not paid for their work.

Mr. Ortiz said a number of problems had delayed the payment of $18 million owed to local businesses, but that a special task force has been assembled to expedite the payments.