CHICAGO (CBS) — Bond was set at $1 million for one of two men who were shot by an off-duty Cook County sheriff’s deputy who witnessed them shooting at a vehicle Sunday night in the Southwest Side Marquette Park neighborhood.

Eleazar Ramirez, 18, was charged with aggravated assault of a police officer with a weapon, aggravated unlawful use of a weapon and discharge of a firearm at an armed vehicle, all felonies, according to Chicago Police. David Alvarez, 23, was charged with one misdemeanor count of aggravated assault to a protected public employee.

READ MORE: Chicago Weather: Weekend Warmup Continues

The deputy was eating in his car about 8:40 p.m. Sunday in the 7000 block of South Kanst Drive when he saw two men arguing with people inside a nearby car, police said. He then saw the two pull out weapons and fire at the vehicle.

The deputy got out and identified himself as a police officer. The two turned around and pointed their guns at the deputy, who pulled out his own weapon and shot them, police said.

One suffered a gunshot wound to the leg, and the other was shot in the ankle, police said. They were both taken in good condition to Christ Medical Center in Oak Lawn.

READ MORE: At Least 10 Shot, 1 Killed In Weekend Violence In Chicago

No one else was injured in the shooting.

A police source said both men are documented gang members.

Bond for Ramirez was set at $1 million Tuesday, according to the sheriff’s office. His next court date is scheduled for July 5.

Court information for Alvarez was not immediately available.

MORE NEWS: Bill For Reparations For Black Evanston Residents Soon To Go Up For Vote; Some Say It's Insufficient And Could Make Things Worse

(Source: Sun-Times Media Wire © Chicago Sun-Times 2016. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)