SAN JUAN, Puerto Rico (AP) — The director of Puerto Rico's power company resigned on Friday amid ongoing blackouts and scrutiny of a contract awarded to a small Montana-based company to help rebuild the electric grid destroyed by Hurricane Maria.

Puerto Rico's Electric Power Authority said Ricardo Ramos presented his letter of resignation to the company's board effective immediately. Ramos said in a brief video posted on Twitter Friday evening that it was a very personal decision and that it had nothing to do with any issues covered by the media.

"The focus has to remain on restoring the electrical system," he said as he thanked his power company crews and those that had arrived from New York and Florida.

Gov. Ricardo Rossello briefly told reporters that Ramos is a professional who worked hard to bring power back to Puerto Rico, but that "there were a series of distractions, and a decision was taken to go in another direction."

"That resignation was taken ... in the best interest of the people of Puerto Rico," he said.

Hours after the resignation, Rossello recommended that the board appoint Justo Gonzalez, the company's power generation director, as interim director.

Earlier this week, Ramos testified before a U.S. Senate committee about a $300 million contract awarded to Whitefish Energy Holdings that has since been canceled. The contract is undergoing a local and federal audit.

Prior to the announcement of Ramos' resignation, local newspaper El Vocero had reported on Friday that Ramos had awarded a nearly $100,000 contract to an attorney for consulting work just days after Hurricane Irma brushed past Puerto Rico. It was the same attorney Ramos previously had tried to appoint as sub-director of the power company. Rossello said that contract also will be reviewed.

Ramos said in a Facebook post published on Friday before his resignation that the contract was legitimate.

"Absolutely nothing was done outside the law," he said.

Ramos acknowledged mistakes Tuesday as the utility sought immediate help in the aftermath of the storm, which destroyed the island's power grid.

Whitefish was one of only two companies that offered immediate services, Ramos said. The other company required a guaranteed payment of $25 million — money the bankrupt utility with a $9 billion debt load did not have, he said.

Lawmakers from both parties criticized the power authority for failing to seek mutual assistance from other public power providers — assistance that was offered to Florida and Texas utilities following hurricanes Harvey and Irma

More than 20 of Puerto Rico's 78 municipalities remain without power nearly two months after Maria hit the U.S. territory as a Category 4 hurricane. A major blackout occurred on Wednesday just as the government had announced it had reached 50 percent of power generation. Two more large blackouts have since been reported as crews work to restore power.

Ramos said the recent blackouts were a result of problems ranging from overgrown vegetation to fuel not being supplied on time.

Rossello has said he anticipates 80 percent power generation by end of November and 95 percent by mid-December. However, the U.S. Corps of Engineers has said it expects 75 percent power generation by end of January.