Authorities identified the suspect as 33-year-old Miguel Alvarez of San Bernardino. He was booked at West Valley Detention Center for attempted murder, with bail set at $1 million.
The incident unfolded Tuesday shortly after 10 a.m., when two San Bernardino County sheriff's deputies with the Court Services Division arrived at a home in the 1400 block of E. Date Street to serve an eviction notice.
According to officials, the deputies were still in their marked patrol vehicles when Alvarez allegedly opened fire as he drove by. Gunfire struck one deputy through the driver's side door of one of the patrol units.
The two deputies were able to exit their patrol cars and return fire. Shortly after the gun fight, a San Bernardino police officer assisting the investigation located Alvarez and his vehicle, a silver four-door Kia sedan, in the area of Elmwood, south of Highland Avenue.
The injured deputy, described by the department as a 24-year veteran, was transported to Loma Linda University Medical Center, where he was treated and later released.
The motive for the attack remains unknown.