BOSTON (Reuters) - More than a thousand Puerto Rican families who fled Hurricane Maria will get two more weeks of U.S.-funded housing in hotels and motels across the country but will then need to fend for themselves, a federal judge ruled on Thursday.

Slideshow ( 2 images )

U.S. District Judge Timothy Hillman in Worcester, Massachusetts, rejected an advocacy group’s request to stop federal officials from cutting off the aid to people who fled the massive September 2017 storm that killed almost 3,000 people and destroyed homes and infrastructure across the island.

Lawyers for a group of Puerto Ricans pursuing the lawsuit argued that the Federal Emergency Management Agency’s decision to terminate aid violated their due process rights. They also said FEMA’s support was unequal compared to how it aided victims of other U.S. hurricanes in 2017.

The judge rejected their request to require FEMA to continue providing aid to evacuees until they obtained temporary or permanent housing. He told the agency to continue to pay so the evacuees can remain until Sept. 14.

He said the evacuees failed to establish that they were entitled to continued benefits under the federal statute governing FEMA aid.

“While this is the result that I am compelled to find, it is not necessarily the right result,” Hillman wrote. He added that he could only apply the law and not require FEMA “to do that which in a humanitarian and caring world should be done.”

FEMA spokeswoman Dasha Castillo said the agency was aware of the ruling and was notifying participating hotels that the aid program was being extended.

LatinoJustice PRLDEF, an advocacy organization that represented the Puerto Ricans in the case, said it is considering its options.

Hurricane Maria struck Puerto Rico with winds close to 150 miles per hour (240 km per hour) on Sept. 20, 2017, causing an estimated $90 billion in damage to the already economically struggling U.S. territory.

A study commissioned by the territory’s government and released on Tuesday found that the storm caused about 2,975 deaths, not 64 as counted previously.

Critics have said the federal government responded poorly to the disaster. They contend President Donald Trump’s administration viewed Puerto Ricans as second-class citizens, a claim it denies.

According to FEMA, 1,038 families displaced by Maria as of Thursday were receiving aid under a program that pays for hotel lodging. Since its launch, the program has helped 7,032 families.

FEMA had planned to end the program on June 30 but courts had blocked it.