NEW YORK (Reuters) - A New York judge on Monday ordered authorities to take a jailed asthma sufferer to a hospital but denied his request for emergency bail from a Brooklyn federal detention center where heat and power failed during last week’s frigid weather.

Slideshow ( 2 images )

The order came as the law firm Kaplan Hecker & Fink LLP filed suit on Monday at U.S. District Court in Brooklyn, saying the Federal Bureau of Prisons has exposed prisoners to inhumane conditions at Metropolitan Detention Center (MDC).

The conditions at MDC sparked protests outside the jail this weekend by friends and relatives of the prisoners and outcries from government officials.

“The lawsuit seeks immediate relief for the deplorable and rapidly deteriorating conditions at the facility, including sustained periods of time with little heat, light and medical care for inmates,” the law firm said in a statement.

Authorities said power and heat had been restored at the prison on Sunday after an outage caused by a Jan. 27 electrical fire, leaving some of the more than 1,600 men and women in cold, dark cells for days. Lawyers for the inmates have disputed that and said some areas of the prison were still without power.

In a separate hearing on Monday, a judge temporarily restored the right of attorneys to meet with prisoners at the center after federal authorities had suspended such visits. A hearing on the issue was scheduled for Feb. 13.

Wyn Hornbuckle, a spokesman for the U.S. Justice Department and the Federal Bureau of Prisons, said in a statement on Monday that the facility has returned to normal.

The department “will work with the Bureau of Prisons to examine what happened and ensure the facility has the power, heat and backup systems in place to prevent the problem from reoccurring,” Hornbuckle said.

Lawyers for Dino Sanchez, who has been housed at the detention center since Jan. 16, requested emergency bail for their client, claiming that he was receiving improper care for his chronic asthma.

Benjamin Yaster, a lawyer with the Federal Defenders of New York, said the power outage kept Sanchez from requesting medical care through the jail’s computer system.

The conditions made it difficult for Sanchez to breathe and left him “spitting up blood” in his cell over the weekend, Yaster said during the hearing at the United States District Court in Brooklyn.

Judge Ann Donnelly denied the bail request, saying Sanchez still posed a threat to society, but said that he was entitled to proper medical care. A second hearing on the matter was scheduled for Tuesday.

Sanchez, who wore tan jumpsuit during the court appearance, was arrested as a suspect in a heroin distribution ring operating in Brooklyn, according to a statement from the U.S. Department of Justice. He appeared to be shivering while clutching his chest during the hearing.