Updated

A federal judge on Friday shot down a lawsuit that sought to keep a cruise ship docked here as temporary housing for hurricane evacuees, saying the question was not a matter for the courts.

The ruling on the Scotia Prince ship lets the Federal Emergency Management Agency close the book on its use of cruise ships as a stopgap housing for evacuees in Louisiana and Mississippi.

Thousands of police officers, firefighters, postal workers, city workers and displaced residents were put aboard the ships after Hurricane Katrina hit on Aug. 29, killing more than 1,300 people.

U.S. District Judge Peter Beer said in his ruling it was not the judicial system's role to take over the decision-making of federal agencies. But Beer said that he would "follow this matter closely and consistently" to make sure FEMA holds to its promise to house people made homeless by Katrina.

The lawsuit was brought by residents of the Scotia Prince, who wanted the cruise ship to stay in St. Bernard Parish for several more months. They argued that FEMA had not fulfilled its mandate to provide adequate housing for evacuees.

Hundreds of hurricane evacuees who had been living on two other cruise ships in New Orleans began clearing out Wednesday, after FEMA told them the cruise ships needed to return to private service.