A gunman posing as a customer opened fire inside a yoga studio in Tallahassee, Florida, on Friday, killing two women and wounding five others before killing himself, authorities said. Local police identified the shooter as Scott Paul Beierle, 40.

Police said Beierle shot six people with a handgun and pistol-whipped another. Patrons fought the gunman and prevented him from harming others. Two of the victims died, while another two are in stable condition. Three have been released from the hospital.

"The fact we had people fight this attacker and prevent him from doing further harm speaks to the true spirit of Tallahassee," police chief Michael DeLeo told reporters Friday.

Get Breaking News Delivered to Your Inbox

The deceased victims were identified as Maura Binkley, 21, and Nancy Van Vessem, 61. Florida State University (FSU) President John Thrasher said Binkley was a student at the college and Vessem was a faculty member.

"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," Thrasher said. "We feel this loss profoundly and we send our deepest sympathies to Maura's and Nancy's loved ones while we pray for the recovery of those who were injured."

A gunman killed two people in Florida. CBS News

Police said Beierle acted alone, but investigators are still searching for a motive and his connection to the victims.

Leon County Court records show Beierle had criminal history relating to the harassment of several women. In 2012, the FSU graduate was arrested for allegedly grabbing the buttocks of two women at a campus dining hall. He denied intentionally grabbing anyone.

In 2016, Beierle was arrested for grabbing and slapping the buttocks of a woman at an apartment complex's pool, according to court documents. Prosecutors dropped the charges after both of his arrests.

Police responded to the shooting at the upscale shopping plaza around 5:30 p.m. Friday.

Melissa Hutchinson is a bartender across the street from the studio. She administered first aid as bloodied victims rushed inside the bar to take cover. "I had two people that I was helping, they were very emotional," Hutchinson said. "They just saw people get shot. It was a shocking moment."

Tallahassee Mayor Andrew Gillum and Gov. Rick Scott visited the gunshot victims in the hospital. "These have become far too frequent in our society," Gillum said Friday. "It is my sincere hope that beyond this, we will all reflect on why that might be."

Caroline Linton contributed to this report.