A Broome County man accused of hitting a state trooper with his car pleaded guilty, just minutes before his trial was set to begin.

James Giacalone, 37, pleaded guilty to attempted aggravated assault on a police officer Monday morning.

It's a deal he rejected last week.

Giacalone hit a trooper back in January, while trying to avoid arrest on an active warrant.

The trooper was treated and released from the hospital but still hasn't been able to return to work.

Giacalone faced trial on five counts, including attempted murder.

Under his deal, he will be sentenced to 12 years in prison this November.