The gunman who allegedly shot and killed an off-duty Chicago police officer over the weekend apparently gunned down the "first Hispanic person" he saw after an unrelated fight at a nearby fast-food restaurant, the city's top cop said Monday.

Chicago Police Superintendent Eddie Johnson said at a news conference that Menelik Jackson, 24, and Jovan Battle, 32, were searching the area after Jackson and another friend had a fight with a group of men outside the flagship McDonald's restaurant in Chicago's River North area.

“In an act of cowardice Mr. Jackson went to get a gun to settle this petty dispute," Johnson told reporters.

2 CHARGED IN FATAL SHOOTING OF OFF-DUTY CHICAGO POLICE OFFICER

The 24-year-old allegedly planned to shoot a member of the group he'd been fighting with, but the men's party bus had already left the area. So, Johnson said, Jackson decided on a different target.

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

An hour after Jackson's initial fight with the since-departed men, 23-year-old off-duty officer John Rivera was repeatedly shot while sitting in a car with three friends after visiting a pizza bar in the neighborhood. Rivera, a two-year veteran and patrol officer who had finished his shift hours earlier, was shot in the chest, arm and mouth. He was pronounced dead at the hospital.

Rivera's friend, who is also 23, was taken to the hospital in critical condition but is expected to survive. Another off-duty Chicago cop and a female civilian were in the car, too, but were not injured, police said.

OFF-DUTY CHICAGO COP SHOT DEAD WHILE SITTING IN PARKED VEHICLE, ANOTHER MAN CRITICALLY INJURED

Officials announced Monday that the alleged gunman, Jackson, was being charged with murder and attempted murder, along with Battle. 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.

Battle had met up with Jackson and a third individual to track down the group from the party bus fight, according to Assistant State's Attorney James Murphy. He added that surveillance camera footage showed Jackson pulling out a handgun and aiming it directly at the driver's window of the car Rivera was sitting in. Before approaching the vehicle, the prosecutor said Jackson pointed at the car Rivera was in several times before approaching, the Chicago Sun-Times reported.

“Jackson is clearly seen on video pulling out a handgun and pointing [at] the driver’s window from a few feet away,” Murphy told the court. “Surviving victims [heard] from outside the car, ‘Let’s blow this b____h up.’”

Prosecutors also portrayed the shooting as a case of mistaken identity, according to the Sun-Times.

Battle had been arrested nearly 50 times since 2005, while Jackson was still on probation from a domestic violence case, according to court records obtained by the Sun-Times. Chicago Police police spokesman Anthony Guglielmi said that when cops arrested Jackson, officers used Rivera's handcuffs to place him into custody.

Assistant Public Defender Christopher Anderson, who is representing Battle, said his client was denied the opportunity to make phone calls at the police station, adding the 32-year-old is unemployed and receives Social Security assistance for bipolar disorder and depression. Jackon's legal representative, Attorney Robert Willis, said his client has an associate's degree and works at a specialty auto parts shop.

CLICK HERE FOR THE FOX NEWS APP

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

Rivera had been a Chicago officer for nearly two years.

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

Fox News' Lucia Suarez and the Associated Press contributed to this report.