The attack on three patrons at a gay bar was a crime against the entire city, the mayor said at a candlelight vigil outside the nightspot.

Mayor Scott Lang joined about 150 people Thursday night outside Puzzles Lounge, where a young man dressed all in black went on a rampage with a hatchet and a gun earlier in the day, wounding three patrons, including one critically. Police said the attack appeared to be a hate crime.

Authorities searched for 18-year-old Jacob D. Robida, who was wanted on charges of attempted murder, assault and civil-rights violations. He was still at large early Friday, police said.

Under heavy police presence, community members and local politicians denounced the attack at the vigil.

Gays have the right to gather in safety and without fear of violence, said Andrew Pollock, president of the Marriage Equality Coalition of the South Seacoast.

"When you take the rights away from one group, you are dehumanizing that group and making them more vulnerable to violence," he said.

According to court papers, Robida's mother told police that he briefly stopped by the house less than an hour after the brawl and was bleeding from the head. Officers found Nazi regalia in Robida's bedroom and anti-Semitic writings on the wall.

"Obviously we have a man who's dangerous, who's not rational, and he has weapons," prosecutor Paul Walsh Jr. said.

A bartender said it was around midnight when a teen wearing a black-hooded sweatshirt and black pants walked into Puzzles, a gay nightspot in this historic seaport city of 94,000 people about 50 miles from Boston.

He flashed an apparently fake ID and ordered a drink, then asked if the place was a gay bar and was told it was, said the bartender, who asked to be identified only by his first name, Phillip, because of fear for his safety.

The bartender said the teen finished his drink and walked back to where two men were playing pool. He shoved one of them to the ground, then pulled a hatchet from his sweatshirt and began swinging at the man's head, cutting him, Phillip said.

Other patrons tackled the man, sending the hatchet sliding across the floor, the bartender said. Then the attacker pulled a gun, shot a man, and then fired another bullet into the chest of a patron who was leaving the bathroom, the bartender said.

He then ran off into the night.

Police recovered the hatchet and found a knife outside. The knife was not apparently used in the attack.

Authorities identified the injured men as Robert Perry, Alex Taylor and Luis Rosado. One has a gunshot wound to the chest, another a gunshot wound to the back and severe cuts to his face, and a third suffered multiple cuts, police said. They would not specify which man suffered which injuries.

All three victims remained hospitalized. Police said one was in critical condition, but would not say which man.

A family friend who answered the door at Robida's home said his mother had no comment.

Some patrons said there has been occasional low-level harassment at the bar over the years.

Puzzles has been egged, cars parked outside have had windows smashed and teenagers have thrown rocks and bricks at the building's facade for years, said Dan Sheteron, 51, who lives upstairs. Anti-gay graffiti often defaces the building.

"This doesn't surprise me," Sheteron said of the attack. "It was either going to be this or a firebomb through the front window."