A man who had been repeatedly accused of groping women and linked to misogynistic YouTube rants walked into a yoga class and opened fire on Friday evening, according to Tallahassee police, shooting six people and killing two of them.

Police said the shooting suspect, Scott Paul Beierle, 40, killed himself minutes before they arrived at the Hot Yoga studio, which sits above a row of restaurants at a northern Tallahassee, Florida, shopping center.

"In my public service career, I have had to be on some bad scenes. This is the worst," City Commissioner Scott Maddox wrote after seeing the attack's aftermath. "Please pray."

About a dozen people were inside Hot Yoga when a man with a black bag walked in around 5:30 p.m., the Tallahassee Democrat reported. The studio had advertised a Pilates certification class for the weekend.

Among the yoga students were Florida State University student Maura Binkley, 21, and 61-year-old Nancy Van Vessem, a local physician and a faculty member at Florida State. Both women were killed in the gunfire.

Police were still investigating a motive behind the shooting.

Beierle had been arrested twice in the past six years by the university's police, according to criminal records. The first time was in 2012, when two women accused him of grabbing their buttocks on campus, the Democrat reported. He was detained again two years later for trespassing in a dining hall.

About a month after the 2014 arrest, BuzzFeed News reported, Beierle posted a series of YouTube videos about his hatred of women under the name "Scott Carnifex."

In a video titled "The Rebirth of my Misogynism," he angrily recalled an incident in his eighth-grade home economics class, describing "the will that a group of females can generate when they target anyone, be it an adult male or a classmate." Other outrages in his life included women who gave him their phone numbers and later told him they had boyfriends. In one video he identified with Elliott Rodger, an avowed misogynist who killed six people at the University of California at Santa Barbara earlier that year.

In other videos Beierle spewed racism, according to the Associated Press. He denigrated black women as "disgusting" and suggested planting land mines to stop people trying to cross the U.S.-Mexican border, AP said.

Charges were dismissed for both of Beierle's university arrests, but he agreed to a plea deal after a final arrest by Tallahassee police in 2016. According to a police report, he was living in an off-campus apartment in his late 30s – noticeably older than the other residents – and one day offered to put lotion on a 19-year-old sunbathing by the pool. When the woman declined, she told police, Beierle "slapped her butt, and grabbed it and then shook it."

On Friday evening, survivors said Beierle kept walking in and out of the yoga studio as class began, according to Melissa Hutchinson, who works at a restaurant below Hot Yoga and later cleaned a survivor's blood off the kitchen floor.

"They said he just kept coming in and out the doors and was a little sketchy," Hutchinson told the Democrat. "But nobody said anything."

The man eventually stopped in the studio's doorway, pulled a gun from the bag and loaded it in front of the students. Only then did people try to flee or fight.

"Everyone started pounding on the windows and the walls," Hutchinson said. "I heard a couple people at Riccardo's heard the pounding. They weren't sure what it was. They said it sounds like someone was hitting sheet metal."

Then the sound of gunshots filtered through the ceiling of Riccardo's pizzeria, Food Glorious Food and the other establishments on the shopping center's lower level.

Shanta Combs told the Democrat she was drinking with friends at Bar on Betton when they heard the bartender yell: "'Active shooter, get down, get away from the window!"

Panicked and wounded people fled down a staircase from the studio and ran inside for shelter. Combs said she embraced a woman who couldn't stop hyperventilating.

Then "I see this kid in a white T-shirt with blood coming out of his forehead," Combs said. The person in the T-shirt had been pistol-whipped while trying to fight off the gunman, police later said.

Another customer at the bar, Kristin Jacobs, was among several who praised the survivor's actions. "I am alive because one guy in a yoga class in his bare feet ran at a shooter," she told the Democrat.

Police said the first officers arrived about three minutes after the 911 call, at 5:40 p.m. Seven people had been shot inside the studio, including Beierle, who appeared to have killed himself, police said.

Four of the wounded were expected to survive, including one whom the Democrat reported had been shot nine times.

Binkley and Van Vessem died of their wounds.

A doctor of internal medicine and director for Capital Health Plan, Van Vessem also worked at Florida State. The suspected gunman had been barred from that campus after his first groping arrest.

"To lose one of our students and one of our faculty members in this tragic and violent way is just devastating to the Florida State University family," school president John Thrasher said in a statement to the Associated Press.

As officers shuffled in and out of the shopping center behind him in the early morning, Tallahassee Police Chief Michael DeLeo told reporters he did not yet know what connection, if any, Beierle had to the victims. The suspect had been living in Deltona, on the other side of the state, DeLeo said. Investigators were trying to figure out "what made him come to our community and commit this heinous act."

Tallahassee Mayor Andrew Gillum, who is the Democratic nominee for governor in Tuesday's election, left the campaign trail and returned to his city overnight to see survivors in the hospital. "No act of gun violence is acceptable," he wrote on Twitter. His Republican opponent, Ron DeSantis, called the shooting "heartbreaking."

The Tallahassee Democrat reported that a crowd stood outside the barricaded shopping center late into the night, some in tears.

"It's awful that this is a thing," Hutchinson told the newspaper, and laughed nervously. "It's very terrible that this is a thing."