A young Chicago off-duty police officer was gunned down in a parked car by a man who was looking for a Hispanic person to attack after a confrontation at a fast-food restaurant, the city's police chief said Monday.

"I guess he settled for the first Hispanic he saw," Superintendent Eddie Johnson said.

Murder charges were filed in the weekend slaying of John Rivera . The 23-year-old was repeatedly shot while sitting in a car with three friends after visiting a pizza bar early Saturday in Chicago's River North area. Another person was injured.

The alleged gunman, Menelik Jackson, 24, of South Holland, was charged with murder and attempted murder, along with Jovan Battle, 32, of Chicago.

Cook County Circuit Court Judge John Fitzgerald Lyke ordered the two men held without bond.

"Both gentlemen pose a real and present threat to the victims, the live victims in this case, this community and every other human being on the planet that they come into contact with," the judge said.

Assistant Public Defender Christopher Anderson, who is representing Battle, said his client was denied the opportunity to make phone calls at the police station. He added Battle is unemployed and receives Social Security assistance for bipolar disorder and depression.

Attorney Robert Willis said Jackson has an associate's degree and works at a specialty auto parts shop.

Battle met up with Jackson and a third individual to track down the people involved in the altercation at the restaurant, Assistant State's Attorney James Murphy said. He added Battle pointed at the car Rivera was in several times before the suspects approached the vehicle.

Surveillance camera video clearly shows Jackson pulling out a handgun and aim directly at the driver's window of the car Rivera was sitting in, Murphy said.

Johnson said Jackson had tried to become a police officer in 2017, which he described as "disgusting."

He said Jackson, who is black, was looking for revenge after a dispute with Hispanic men on a party bus at a nearby McDonald's. An hour later, around 3:30 a.m., shots were fired into the parked car. No words were spoken, according to police.

Rivera had been a Chicago officer for nearly two years.

"John's a sweetheart. He's an angel," said friend Jennifer Navarro, 23. "Why would someone just want to take his life away like that? He had a whole life ahead of him."

Investigators are searching for the third man who was with Battle and Jackson during the shooting, Johnson said.