FRANKFORT, Ind. (AP) — A man charged with killing a former girlfriend and her grandmother outside an Indiana factory in 2021 has pleaded guilty in a deal that takes a possible death penalty off the table, authorities said.

In this Aug. 18, 2021, file photo law enforcement investigate the scene of a fatal shooting in the parking lot of the NHK Seating of America automotive plant near Frankfort, Ind. (Nikos Frazier/Journal & Courier via AP, File)

Gary Ferrell II, who was 26 years old at the time, was accused of fatally shooting Promise Mays, 21, and Pamela Sledd, 62, during a shift change at NHK Seating of America in Frankfort, 50 miles (80.4 kilometers) northwest of Indianapolis. The evidence included factory security video.

Ferrell had tried to force Mays into the trunk of his car, according to a police affidavit filed earlier in the case.

Ferrell pleaded guilty Tuesday in Clinton County court, the prosecutor’s office said.

“The death penalty notice will be dismissed. The parties reached this agreement after (Ferrell) raised the defense of intellectual disability to the death penalty,” the prosecutor’s office said. “Sentencing is tentatively set for an all-day hearing on Aug. 30.”

A message seeking comment from Ferrell’s attorney wasn’t immediately returned Wednesday.

Ferrell was arrested shortly after the shootings after crashing his car in a construction zone, authorities said.