WTXL-TV(TALLAHASSEE, Fla.) — Two people were killed Friday evening when a gunman opened fire on a yoga class in Florida.

People taking a class at Hot Yoga Tallahassee were sprayed with bullets when a gunman, posing as a customer, burst into the studio in Tallahassee just before 6 p.m local time. Six people were shot, two of whom died, and a seventh person was injured when he was pistol-whipped, according to the Tallahassee Police Department.

The gunman was dead when officers arrived on the scene, just three minutes after the first 911 call, police said.

Scott Paul Beierle, 40, has been identified by police as the alleged shooter.

Beierle allegedly used a handgun and began firing at people without warning, police said. During the shooting, customers turned the tables on Beirle to stop the shooting, police said.

"Several people fought back and tried not only to save themselves, but other people, which is a testament to the courage of the people who don't just turn and run but the strength of our community and the spirit of those people trying to help and save and protect others," Tallahassee Police Chief Michael DeLeo said at a press conference Friday night.

After the victims fought back, Beierle turned the gun on himself and killed himself, police said.

Two women died in the shooting, police said. They were identified Dr. Nancy Van Vessem, 61, and Maura Binkley, 21.

Both women had ties to Florida State University. Binkley was a student, while Van Vessem was a faculty member at the school's College of Medicine and a specialist in internal medicine.

"There are no words to express the shock and grief we feel after learning of the deaths of Maura Binkley and Dr. Nancy Van Vessem," Florida State University president John Thrasher said in a statement. "To lose one of our students and one of our faculty members in this tragic and violent way is just devastating to the FSU family. 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."

Van Vessem was also the chief medical director at Capital Health Plan.

"Our Capital Health Plan family is deeply shocked and saddened about the tragic loss of our beloved friend and colleague, Dr. Nancy Van Vessem, among the other victims of this terrible incident," CHP said in a statement. "Nancy has been a guiding light, visionary force in our daily work to serve the wellness and health care needs of thousands of families in this community.

"Her dedication, caring, leadership, humanity, and experience made her one of the most respected, accomplished medical professionals in the state and country," the statement continued. "Our hearts are filled with sorrow and prayers for her family. We all have been so blessed to have Nancy in our lives."

Beierle was connected to FSU, too, police said. He graduated from the school, they said.

Beierle, who was currently living in Deltona, Florida, had served in the U.S. Army, police said. A spokesperson for the Army said he served from 2008 to 2010, but did not offer any specifics about his service.

He had also had police called on him in the past for allegedly harassing young women, authorities said.

Beyond the FSU connection, investigators were trying to see what other ties Beierle had with the people inside the yoga studio, police said.

In addition to Van Vessem and Binkley, two other victims were wounded, police said.

They were in fair condition, and three other victims have been treated and released from Tallahassee Memorial Healthcare, according to Danielle Buchanan, a spokeswoman for the hospital.

According to the hospital's Twitter page, there will be a service tomorrow honoring the two women who died.

Tallahassee Mayor Andrew Gillum, who is the Democratic candidate for Florida governor, was campaigning in Miami with former President Barack Obama earlier in the day Friday and returned to his home city to visit the two hospitalized victims that night.

"Both were in surprisingly encouraging spirits," Gillum said at a campaign rally in Orlando on Saturday. "There was one victim in particular that pulled me in close and said, 'I'm expecting you to do something about this gun violence.'"

Gillum has touted his opposition to the National Rifle Association throughout his campaign and favors increased gun control measures.

"The memories of Pulse nightclub still reside with all of us. We know the story of Marjory Stoneman Douglas," Gillum said, referring to previous mass shootings in the Sunshine State. "We know the kind of gun violence that pervades too many of our neighborhoods, too many of our communities every day of the week."

Copyright © 2018, ABC Radio. All rights reserved.