GOODYEAR, Ariz. - The Maricopa County Sheriff's Office said a deputy shot a man who rear-ended his vehicle in a parking lot and approached him with a knife Thursday afternoon in Goodyear.

The man was taken to a hospital in serious condition and the deputy was not hurt in the exchange, according to MCSO.

Maricopa County Sheriff Paul Penzone said the deputy's MCSO car was rear-ended around noon near McDowell and Dysart roads.

The driver of the car that hit the deputy's got out with a knife and approached the deputy, officials said. When the deputy told the man to stop, he kept approaching him, so the deputy shot him, according to MCSO.

The sheriff's office is continuing to investigate the shooting, working to determine what may have led to the shooting.