ALBANY — The Washington Avenue Armory has reached a deal with the city to keep hosting live music, including large dance parties.

The agreement comes in time for an electronic dance music concert this Friday called Masquerave, which had originally been set for Oct. 26 but was postponed after a large fight erupted outside another event at the venue a week earlier. That melee, in which three police officers were injured, sparked a zoning crackdown which threatened to silence the venue.

"We're excited. We appreciate the time and effort the city has put into this so we can open back up and have a great show this Friday," said Michael Corts, spokesman for the Armory.

The agreement with the city requires all concerts on Thursday, Friday and Saturday nights to end by 1 a.m. Other days of the week, the shows must stop by midnight. Doors will open at 7 p.m. The Armory must also go before the city's Board of Zoning Appeals to get an interpretation for what the zoning at the corner of Lark Street and Washington Avenue allows.

City codes officials initially seized on a 2007 decision to argue the venue did not have permission to operate as a nightclub and lacked the required cabaret license to host live music. But a 2003 BZA decision subsequently uncovered left the question of allowed uses less clear, said Jeffery Jamison, director of the Division of Buildings and Regulatory Compliance. The Armory contended the dance parties were equivalent to concerts, which are allowed, not a nightclub.

Requiring the facility's management to appear before the BZA for an interpretation should clarify that, Jamison said, and give neighbors a forum to voice their concerns.

Jamison called the pact a fair middle ground that took into consideration neighbors' concerns and demands on the Armory's business model to keep the venue open and the building from becoming vacant.

"You're dealing with a public safety and a quality-of-life issue," Jamison said. With the pact, he added, "the city is able to have constraints and parameters in place to protect the visitors and patrons and the residents of the city."

The city is also limiting the number of people who can be on the floor of the armory to 2,100 attendees. The first 2,100 people to buy tickets will be given a wristband that give them access to the floor, Corts said. Other patrons will then have to sit on bleachers. The arena's total capacity for concerts is 4,480.

Management will also be required to bring in a security company to draft a plan approved by police, Jamison said.

During the melee outside the October Barstool Blackout Tour foam party, fighting broke out when at least 1,000 party-goers jostled to get inside the event after being forced to wait outside for doors to open at 9 p.m.

For non-sporting events, a special area must be created for the consumption of alcohol, Jamison said. Only those 21 and older would be allowed inside it. Violations of any of the terms would be grounds for the city to revoke the pact, Jamison said. The agreement does not address the cabaret license issue.

The Armory's announcement of the deal Tuesday came before the city had a chance to share it with local neighborhood organizations, leaving some upset and skeptical.

"We should have heard about it first," said Richard Berkley, president of the Hudson/Park Neighborhood Association on the southern end of Lark Street. "We can't support what we have not seen and were not consulted on."