Two men – including one who reportedly once applied to be a Chicago police officer – were arrested overnight Monday for allegedly shooting and killing an off-duty cop and critically injuring another man.

Alleged gunman Menelik Jackson, 24, had once applied to be a Chicago cop before he was arrested at the police academy a few years ago in connection with a home invasion. On Monday, he was charged with first-degree murder in the shooting death of 23-year-old Officer John P. Rivera, the Chicago Tribune reported.

The other man charged, Jovan Battle, is accused of being a “co-conspirator” who was with Jackson at the time of the shooting. Police are still seeking a third person of interest, police spokesman Anthony Guglielmi said Monday morning.

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

Police previously said at least two individuals approached a parked vehicle where Rivera and the other man were sitting, produced a gun and opened fire before running off.

At the time of the attack, four people were sitting in the parked car after having gone to Stout Barrel House & Pizza, the Tribune reported.

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.

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

Guglielmi said video obtained during the investigation did not indicate carjacking as a motive.

CHICAGO REDUCES MURDER RATE IN 2018 BUT LEVEL STILL OUTSTRIPS LA AND NY COMBINED

Jackson was previously arrested July 2, 2017, after allegedly breaking into his ex-girlfriend’s apartment and pointing a gun at her head, the Tribune reported.

In that case, the victim told police Jackson told her he was going to the Chicago police academy on the Near West Side before fleeing.

Officers called the academy and Jackson was arrested on home invasion and weapon charges. Court records show he later pleaded guilty to a felony charge of attempted burglary and was sentenced to probation, the Tribune reported.

CLICK HERE TO GET THE FOX NEWS APP

Chicago, the nation’s third-largest city, has been reeling from widespread homicides and gun crime, becoming the crime capital of the country.

Although the city managed to reduce the number of homicides in 2018 -- compared to the two prior years -- more people were killed in the city than in Los Angeles and New York City combined.

Chicago police reported 561 homicides were committed between Jan. 1 and Dec. 31, 2018, compared to 660 homicides in 2017 and more than 770 in 2016, which marked a 19-year high and put a national spotlight on Chicago’s persistently high rates of gun violence.

Fox News' Lukas Mikelionis contributed to this report.