It happened Thursday morning on Highway 41 near Highway 49.
RELATED: Madera County Sheriff's Office investigating deputy-involved shooting in Oakhurst
The sheriff's office has now identified the deputy as Neil Cuthbert.
He is a veteran with the department assigned as a detective to the Oakhurst substation.
He's now at home recovering after suffering serious facial and head injuries.
The suspect has now been identified as 33-year-old James Mcready.
He's listed in critical condition with a gunshot wound to the stomach area.
Officials say Detective Cuthbert was being assaulted when he fired a single round at the suspect.
Mcready is under arrest for assault on a peace officer.