A weekend compliance check at P*Town, a gay bar in Bloomfield, was prompted by an overcrowding complaint — not to target the LGBTQIA community, Pittsburgh Mayor Ed Gainey said Monday.

In explaining the city’s actions, Gainey appeared to be responding to social media commentary that sprang up after police officers and other law enforcement agents entered the bar, prompting concerns.

Some patrons and supporters posted on various social media channels that the police action was not warranted.

“I believe this was a targeted attack on a gay establishment,” one person posted in Facebook comments.

But Gainey, a progressive who has championed the rights of trans people, minorities and marginalized communities, said that was not the case.

Still, he said he has asked acting police Chief Martin Devine and Public Safety Director Lee Schmidt to review the incident and the operation of the task force that carried out the compliance check.

In his comments, the mayor conjured the history of oppression of gay people in the U.S. through heavy-handed police tactics.

“It was not so long ago that police raids on gay bars were routine, and it was one such raid, at the Stonewall Inn in Greenwich Village, that sparked the modern movement to establish safe places for people to be open about their gender and sexuality without fear of arrest,” said the statement from Gainey. “It is my intent that our actions as a city build upon, rather than undermine, that legitimate desire for safety.”

The check came after 11:30 p.m. Friday and into Saturday morning as the transgender performer Amanda Lepore’s appearance was getting underway.

“When the officers arrived, we were asked to pause the event and have guests step outside while the inspection was carried out. The officers acted professionally, to my knowledge, no patrons were mistreated,” said the bar’s owner who uses a mononym, Quan.

Quan also released a statement on the bar’s Facebook page.

The check found violations including an uncovered trash bin in a restroom, a fire extinguisher that was improperly hung and exit signs that didn’t function when power was cut off, Quan said.

Those issues are being remedied and they’re working with the city to update the bar’s occupancy permit, Quan said.

City Councilwoman Deb Gross said she spoke with Quan on Monday to address any concerns.

“I know the importance of P*Town as a venue, safe space and community building,” Gross said.

The check was made by the Pittsburgh’s Nuisance Bar Task Force, a group overseen by the police that also includes fire, health, other city and county regulatory officials, as well as state Liquor Control Enforcement.

There were 133 people in the bar at the time, nearly double 70, which is the number allowed by its occupancy permit.

Gainey said that while it’s necessary to enforce the city’s rules and regulations, he acknowledged how the compliance check could have been traumatic for patrons at the time.

“We need to be thoughtful about the fear that the sudden appearance of multiple armed officers can cause,” Gainey said.

There also need to be safeguards to ensure complaints to the task force can’t be used to target people.

“I take personal responsibility for ensuring that our city services are equitable, and we will continue to work to build trust and prioritize the safety of our most marginalized residents,” Gainey said.

As the councilwoman who has represented Lawrenceville and Bloomfield and formerly the Strip District, Gross said she is well-versed in the issues surrounding what she called the city’s nighttime economy and will work to help P*Town through these issues.

P*Town itself was viewing the situation as an opportunity to grow and improve, Quan said.