(Reuters) - The U.S. Treasury Department and storm-ravaged Puerto Rico say they have reached a deal to let the bankrupt U.S. territory access billions of dollars in long-disputed federal loans to help it recover from last year’s Hurricane Maria.

Slideshow ( 2 images )

In a joint news conference on Thursday in San Juan, broadcast on the internet, Puerto Rico Governor Ricardo Rossello and U.S. Treasury Secretary Steven Mnuchin said the island can access the so-called community disaster loans (CDLs) as needed until March 2020, once its cash balance dwindles below $1.1 billion.

The agreement still needs approval by the federally-appointed board that oversees Puerto Rico’s finances, as well as the judge presiding over its $120 billion bankruptcy.

Spokesmen for the board had no immediate comment on Thursday.

The dispute over the loan had ratcheted up tensions between Puerto Rico and Washington, as the island battles the aftermath of its biggest natural disaster in 90 years, while navigating the largest government bankruptcy in U.S. history. It also raised questions about the reliability of Puerto Rico’s financial record-keeping.

The U.S. Congress in October appropriated $4.9 billion in loans for Puerto Rico and the U.S. Virgin Islands, but while the Virgin Islands were allowed access to the funds - and have drawn down around $200 million so far - Puerto Rico was not.

The island’s leadership warned that devastation from September’s Hurricane Maria could cause it to run out of cash, but the U.S. Treasury, along with the U.S. Federal Emergency Management Agency, found that Puerto Rico had $1.7 billion in its coffers.

Last month, the Treasury said it would consider allowing access to around $2 billion, but only under conditions that Rossello called “extremely difficult” in a Feb. 26 letter to U.S. lawmakers. He complained, in the same letter, of Treasury’s “arbitrary conduct” in denying access.

Under Thursday’s accord, Puerto Rico can begin accessing money on an as-needed basis, once its cash reserves dip below $1.1 billion. It remains unclear how much Puerto Rico may initially draw down, Carlos Mercader, executive director of the Puerto Rico Federal Affairs Administration, told Reuters on Thursday.

Rossello thanked Mnuchin at the news conference, saying, “When there are issues to be resolved, the best way to do it is principal to principal, face to face.”

Mnuchin, who stopped on the island on his way back from the G20 meetings in Argentina, said it “was very important” to meet with Rossello to “make sure we resolve whatever issues we had.”

Puerto Rico was already in bankruptcy, battling near-insolvent health and pension systems and a decade-long recession, when Maria hit on Sept. 20.

The storm killed dozens and decimated the island’s already substandard housing stock and electric grid. Thousands remain without power six months later.