A federal judge on Thursday gave Fulton County commissioners 60 days to enter into a binding contract with Atlanta to buy the city jail or face getting sent to the U.S. Penitentiary in Atlanta for contempt.

U.S. District Judge Marvin Shoob, in the order, reinforced a threat he made two weeks ago that he was prepared to take drastic steps to ensure Fulton County fixes its crowded jail.

Inmates sleep on flooring surfaces even as hundreds are outsourced to rented beds in other counties and cities.

“Requiring inmates to sleep on the floor is a blatant violation of the consent order," Shoob wrote of a 2006 agreement.

A lawsuit filed in 2004 detailed dirty, dangerous and crowded conditions at the county jail on Rice Street in northwest Atlanta. The county has struggled to meet the terms of the ensuing consent order.

In April, May and June, 3,406 inmates were forced to sleep on the floor, and in August 1,378 inmates did the same, a jail expert told the judge. The jail's population cap is 2,500.

Fulton taxpayers spent more than $42 million to outsource inmates, most of them untried, between 2006-2010, and this year the county has spent more than $3.4 million.

Most inmates without a bed are in an area where processing takes place, which poses a danger to staff and other inmates.

“I certainly appreciate the need to have additional space,” Commissioner Joan Garner said. “I am working with the chair of the commission to talk with the city to make sure we can do something.”

Other members of the commission did not return phone messages.

In May, Shoob ordered the county to come up with a plan to solve the lack of inmate beds, and he was disappointed with the county's response.

Studies commissioned in 2006 and 2009 by the county recommended expanding the existing jail to accommodate more than 5,000 prisoners.

“By all appearances, both of these studies, for which the county paid hundreds of thousands of dollars, are now sitting on a shelf somewhere gathering dust,” Shoob wrote. “This same pattern is evident with respect to Fulton County's potential acquisition of the Atlanta City Detention Center.”

Atlanta’s Chief Operating Officer Peter Aman told the judge the city was ready to sell the jail but the county had resisted.

The city jail houses 900 immigration detainees and 200 city ordinance violators. Atlanta would lease 200 beds in the jail if it was bought and operated by Fulton County, Aman said.

Two years ago, the proposed jail sale price was $33 million, the balance of the debt at that time. Aman said the price would be less now.

Fulton Sheriff Ted Jackson and Fulton’s judges also have supported buying the jail, but the county attorney, David Ware, told Shoob there wasn’t enough money.

Shoob rejected that explanation, saying it does not excuse the county’s obligation to maintain a safe jail.

“The city jail is clearly only a short-term solution,” Shoob said. “The county must promptly begin implementation of a long-term plan that will address the projected need for more than 5,000 jail beds in just 15 years.”