Leavenworth, Kansas, approved a permit Tuesday that will allow CoreCivic to reopen a shuttered private prison to house immigrant detainees, ending a nearly yearlong legal fight over whether the company needed city approval before restarting the facility.

The decision followed a vote of 4-1 by the Leavenworth City Commission, which approved a three-year permit subject to conditions meant to shape how the center operates. The conditions include setting minimum staffing levels, barring the housing of minors at the facility and creating a city oversight committee, according to the vote coverage.

Mayor Nancy Bauder told commissioners before the vote that the city could take action if the guidelines were not followed. “If they don’t follow those guidelines, we can pull the permit,” Bauder said.

The Midwest Regional Reception Center is a 1,104-bed facility about 10 miles (16 kilometers) west of Kansas City International Airport, and CoreCivic has said the center will generate $60 million annually once it is fully open. The permit approval would therefore restart a prison operation that Leavenworth had tried to prevent through litigation.

Leavenworth’s lawsuit challenged CoreCivic’s attempt to reopen the prison without city officials signing off on the deal. The legal dispute played out in state and federal courts, and the U.S. Department of Justice supported CoreCivic in filings, arguing that Leavenworth had made what the department described as an “aggressive and unlawful effort” to “interfere with federal immigration enforcement.”

In Leavenworth, the proposal drew intense local attention, with about four dozen people speaking against the permit before the City Commission voted. Critics told officials the city should not approve reopening, and police removed a protester who yelled vulgar comments; Bauder also admonished speakers multiple times for being too noisy during public comment.

David Benitez, a city resident who spoke during the meeting, told commissioners, “We, we the people of Leavenworth, are not fooled and we don’t care about their money,” as debate over the permit continued.

Supporters cited potential economic benefits from the permit. Two CoreCivic employees spoke in favor of approval, and one, Charles Johnson of Kansas City, Kansas, said his job gave him purpose and helped his family move off state assistance. “The people I work alongside are caring, professional and committed to doing things the right way,” Johnson said, with his remarks drawing boos from critics outside the commission meeting room.

City Commissioner Holly Pittman said the city had “stood firm” in negotiations over permit conditions and argued that denying the permit could put Leavenworth at risk of an expensive lawsuit. She said before voting yes, “I will not gamble the financial stability of this city,” and added, “Let me be clear: Approval does not mean endorsement.”