In an interview on Thursday, Mr. Ramos said he had not heard of Whitefish before September. “We checked them out on the internet,” he said. “There was a list of projects that they had done in the past, including with the Department of Energy. They showed a lot of experience in using helicopters to build transmission lines. On paper, they did have the experience necessary.”

Mr. Ramos had earlier said that Whitefish got the deal over competitors like PowerSecure because it did not ask for a large payment up front. Other companies, wary of Prepa’s bankruptcy, had demanded hefty sums, he said.

Mr. Ramos said on Sunday that the contract was being canceled because attention had shifted from managing a humanitarian crisis to “managing reputations.” “That’s risky,” he said. “I want to clarify that the cancellation of this contract does not mean there was anything outside the law, or out of the ordinary.”

He said the power authority had already paid Whitefish or been billed about $20.8 million for work done so far, and would have to reimburse the company for the cost of returning helicopters, trucks and other equipment from Puerto Rico to the United States. He said that work that was already in progress would be completed by Whitefish.

Mr. Ramos said he would send a letter to the electric company board asking for a resolution formally ending the contract, and that the board would meet Monday or Tuesday to address the matter. The cancellation would take effect 30 days after a resolution is adopted.

Whitefish said in a statement on Sunday that it was “very disappointed” at the cancellation. “The decision will only delay what the people of Puerto Rico want and deserve — to have the power restored quickly in the same manner their fellow citizens on the mainland experience after a natural disaster,” the statement said. “We will certainly finish any work that Prepa wants us to complete, and stand by our commitments, knowing that we made an important contribution to the restoration of the power grid since our arrival on the island on Oct. 2.”

The company said it had already finished work on two major transmission lines, significantly speeding up the restoration of power to the city of Manatí and to parts of San Juan.