Image copyright Reuters Image caption Five weeks after the storm most of the US-controlled island is still without power

A US utility firm whose $300m (£227m) contract to reconstruct hurricane-ravaged Puerto Rico is under scrutiny has ended up in a Twitter spat.

Whitefish Energy has apologised after threatening to withdraw its employees from the US territory's capital.

The comments were made in an online feud with San Juan's mayor, who has sparred with President Donald Trump.

Some 80% of Puerto Ricans still do not have electricity five weeks after the storm.

Questions have been raised over the deal Whitefish Energy - a Montana company connected with the Trump administration - signed with the Puerto Rican authorities quickly after Hurricane Maria.

Mayor Carmen Cruz told Yahoo! News on Wednesday that "the contract should be voided right away, and a proper process which is clear, transparent, legal, moral and ethical should take place".

"It seems like what the Puerto Rican people are going to be paying for, or the American people are going to be paying for, is an intermediary that doesn't know what is at stake here and that really has to subcontract everything," she said.

In response, Whitefish Energy tweeted a statement calling her comments "misplaced".

A Twitter tit-for-tat ensued in which the company at one point told the mayor: "We've got 44 linemen rebuilding power lines in your city & 40 more men just arrived. Do you want us to send them back or keep working?"

Hours later, as the back-and-forth stoked controversy online, the company apologised.

It said their comments "did not represent who we are and how important this work is to help Puerto Rico's recovery".

Mayor Cruz rose to national prominence when she engaged in a war of words with President Trump shortly after Hurricane Maria hit the island last month.

Image copyright Reuters Image caption Whitefish Energy says it has more than 300 workers on the island

The US House of Representatives Natural Resources Committee is scrutinising the agreement between Whitefish Energy and Puerto Rico's power authority, known as Prepa.

On Thursday, the committee's Republican leadership sent a letter to Prepa Director requesting documents.

He told him "the federal government is reviewing additional measures to ensure federal taxpayer dollars are spent in the most effective manner and that the island's recovery is effective and sustained".

At the same time, several congressional Democrats have called for the US interior department's inspector general to investigate.

Prepa Director Ramos said there was "nothing illegal" about the contract with Whitefish.

The oversight came after critics pointed out a Whitefish investor had made political donations to the Trump campaign and its supporters.

Whitefish's chief executive and Interior Secretary Ryan Zinke come from the same small Montana town that is the company's namesake, and know one another.

Mr Zinke has denied any wrongdoing or involvement in the deal.

Puerto Rican authorities said on Tuesday that a US government agency, the Federal Emergency Management Agency (Fema), will foot the bill.

Fema said it was not involved in the deal-making process, but that it is reviewing the contract.

The Puerto Rican government said on Thursday that Fema's evaluation would be released "soon".

However, a Fema spokesperson said they could not put a release date on the results of the evaluation.

What will happen if the contract is not found to meet Fema standards isn't totally clear.

Walt Green, a former director of the US National Center for Disaster Fraud, told BBC News that Fema could decide to reimburse part or none of the expenses.

Earlier this week, Puerto Rican Governor Ricardo Rossello ordered an audit of the deal.

But he balked at news that a federal oversight board planned to appoint a manager to oversee the island's highly indebted power company.

Prepa is about $9bn in debt and went into bankruptcy in July.