The Puerto Rico electric power company said Sunday that it is canceling a controversial $300 million contract it had signed with a small Montana-based company and tasked with a central role in repairing the territory’s hurricane-ravaged electric grid.

The move came after Gov. Ricardo Rosselló said the contract was a distraction and should be canceled after critics in the electric power industry, Congress and the Federal Emergency Management Agency raised questions about whether the company, Whitefish Energy, was well equipped to respond to the hurricane damage.