Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The gunman who opened fire on a yoga class in Tallahassee, Florida, killing two and wounding several others, had a history of complaints of harassing young women, police said Saturday.

Scott Beierle, 40, turned the gun on himself after the rampage at the Hot Yoga studio in Florida’s capital, which occurred at around 5:37 p.m., police said, and a motive is still unknown. A doctor and college student were killed.

"Scott Beierle entered the business posing as a customer and began shooting patrons with a handgun without warning," Tallahassee police said in a statement. "Patrons fought the assailant to prevent him from harming themselves and others."

Florida yoga studio gunman Scott Beierle is seen in this mugshot from 2016. Leon County Sheriff's Office

Beierle, of Deltona, a city near Florida’s Atlantic coast around 200 miles from Tallahassee, had been staying at a local hotel. Police said “he has been the subject of prior calls for service in the Tallahassee area related to harassment of young women” but did not elaborate.

The Tallahassee Democrat newspaper, citing Leon County records, reported that Beierle was arrested in 2012 for misdemeanor battery for allegedly grabbing the buttocks of two women on the Florida State University campus.

Police reports released Saturday by Tallahassee police show Beierle was arrested in June of 2016 for battery for allegedly slapping and grabbing the rear end of a woman sunbathing in the pool area of an apartment complex where he lived.

Prosecutors eventually dropped the charges in both cases, the Tallahassee Democrat reported.

Beierle was a graduate of FSU and had served in the military, police said.

Beierle died of an apparent self-inflicted gunshot wound, police said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Killed in the shooting was Dr. Nancy Van Vessem, 61, a physician and faculty member at Florida State University College of Medicine, and Maura Binkley, 21, who was a student, officials said. Four other people were shot, and a man was pistol-whipped by the gunman, police said.

Police said that investigators are still trying to determine a motive in the shooting, and whether Beierle had any connection with the victims or business. The Volusia County Sherriff’s Office and Tallahassee police searched his home in Deltona Saturday morning, police said.

Nancy Van Vessem, MD Courtesy Tallahassee Memorial HealthCare

Florida State University President John Thrasher said the school was devastated by the loss of two of their own.

"There are no words to express the shock and grief we feel," he said in a statement Saturday. "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."

Tallahassee Memorial HealthCare said Vessem was a member of its medical staff and offered thoughts and prayers to the families of Vessem and Binkley and all the victims and their families.

Capital Health Plan said Vessem was its longtime chief medical director and that “Nancy has been a guiding, 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,” Capital Health Plan said. "Our hearts are filled with sorrow and prayers for her family. We all have been so blessed to have Nancy in our lives."

Two of the victims who survived the shooting were in stable condition at a hospital, and three others were treated at hospitals and released, police said.

Melissa Hutchinson, a bartender who was at a nearby bar when the shooting occurred, said people ran in to seek safety, including one woman who said there was an active shooter and to lock the doors. Hutchinson, who is CPR-certified and first-aid trained, helped them, some of whom had been shot.

Maura Binkley via Facebook

"They were very emotional. They just saw people get shot," Hutchinson said. “They were able to talk, and they were able to cry ... everybody was just very shaken," she said.

One of those who sought refuge was a man who tried to fight off the attacker and who was pistol-whipped by the gunman, she said.

"They said that he came in and he had a black bag and he pulled it out and as [the gunman] went to go load it, all the yoga studio, the instructor and everybody started pounding on the windows and on the walls to let people know," Hutchinson said.

"It was a very scary time. It was a shocking moment that something would happen like this ... it’s awful that this is, this is a thing," she said. "It’s very terrifying that this is a thing."

Erskin Wesson, who was at a restaurant directly below the yoga studio, said “we just heard like pow-pow-pow-pow,” and it sounded like something falling on a tin roof and rolling.

"And then we saw some people running down the stairs and then assumed it was gunshots," Wesson said.

Police investigators work the scene of a shooting on Nov. 2, 2018, in Tallahassee, Florida. Steve Cannon / AP

The owner of Ricardo's restaurant asked patrons if anyone was a doctor. Wesson’s stepdaughter, an emergency room nurse, went out and helped, he said.

Police Chief Michael DeLeo said that people who fought back against the gunman was "a testament to their courage." He called the shooting a "heinous act."

"The fact that we had people fight this attacker to help save other people and prevent him from doing further harm, really I think speaks to the true spirit of Tallahassee and what this community’s about," DeLeo said at an early Saturday media briefing.