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.

INDIANA SHOOTING: AUTO PLANT EMPLOYEE KILLS 2 CO-WORKERS, POLICE SAY

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 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.

Gary C. Ferrell II Clinton County Sheriffs Office

Gary Ferrell II has pleaded guilty to the 2021 homicides of Promise Mays and Pamela Sledd. (Clinton County Sheriffs Office via AP)

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

DETROIT-AREA AUTO FACTORY CLEANER GETS LIFE FOR COLLEAGUE'S FATAL BEATING

"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.

CLICK HERE TO GET THE FOX NEWS APP

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