AMES, Iowa — The man who police say shot and killed two women before killing himself Thursday had been arrested days before on harassment charges in connection to one of the victims, officials said Friday. 

Authorities identified the shooter as Jonathan Lee Whitlatch, 33, of Boone, Iowa, who they say confronted three women in the parking lot of Cornerstone Church on Thursday evening, said Story County Sheriff Paul Fitzgerald at a news conference Friday.

Whitlatch shot and killed two women, who were identified as Eden Mariah Montag, 22, and Vivian Renee Flores, 21, both students at Iowa State University. One of the women had previously been in a relationship with Whitlatch. The third woman was not injured. 

Whitlatch did not attempt to enter the church after committing the “targeted act of violence,” Fitzgerald said.  He died of an apparent self-inflicted gunshot wound, he said. 

Two days before the shooting, Whitlatch had been charged with harassment and impersonating a public official, and the Tuesday charges were “directly related” to one of the victims, Fitzgerald said. 

‘THEY’RE TREASURED’:With tears and love, Ames members pray for victims of deadly parking lot shooting

The shooter used a 9 mm pistol and authorities later found 9 mm ammunition in his truck along with a receipt of purchase from one hour before the shooting, officials said. 

The shooting happened just before 7 p.m. local time as about 80 college and high school students were in the auditorium of Cornerstone Church, a megachurch 30 miles north of Des Moines, where a bible study group was being held.

“We are grieving deeply,” said Mark Vance, with the Salt Company youth ministry at Cornerstone Church, in a statement Thursday. “Tonight, a tragic shooting occurred involving two young members of our Cornerstone Church community …Our Ministry staff are available to support all those impacted, and we will continue to fully cooperate with authorities as they complete their full investigation.”

‘WE’RE IN A PARALYSIS’: There have already been a dozen mass shootings this year

People console each other after a shooting outside Cornerstone Church on Thursday, June 2, 2022 in Ames, Iowa.

Iowa Gov. Kim Reynolds said the shooting was an “act of senseless violence.”

“Tonight’s act of senseless violence took the lives of two innocent victims at their place of worship. Kevin and I grieve for the families who have suffered an unfathomable loss,” Reynolds wrote on Twitter. “And while the investigation continues and we learn more, we ask that Iowans pray for the victims and their families, the members of Cornerstone Church, and the entire Ames community.”