Denver police officers opened fire on a vehicle — killing one man and injuring another — in the belief that it contained an attempted cop killer who escaped from custody, officials said Thursday.

There was just one problem, though: They had the wrong guy.

“Officers were acting on information provided to them that [the inmate] was in the passenger seat,” Denver Police Commander Barb Archer explained at a press conference.

“They believed that to be him,” she said. “Their actions were based on that belief and based on his criminal history past of being an attempted murderer, that justifies their action.”

But the officers were wrong. They didn’t open fire on a vehicle containing escaped inmate Mauricio Venzor-Gonzalez, who was locked up last November after getting into a shootout with police.

Instead, they wound up shooting at a car with a completely different person in it, whom they injured, before killing his friend in the driver seat, cops said.

“We have no idea where he is,” Archer said of Venzor-Gonzalez’s whereabouts.

“If we did, we would hopefully have him in custody right now.”

Authorities have been searching for Venzor-Gonzalez, 23, since Monday after he managed to escape from custody during a hospital visit that morning.

Cops were stationed outside an address in Denver, which the young man is known to frequent, when they spotted the car that was believed to be carrying him, according to officials.

Inside were two men — Steven Nguyen, the driver, and Rafael Landeros, the passenger.

Officers said they saw the 23-year-olds circling the home in an SUV and tried pulling them over under the belief that Landeros was Venzor-Gonzalez. The pair fled at a “high rate of speed” before eventually stopping the vehicle at an intersection.

The cops told Nguyen and Landeros to both step out of the car, but they refused and began rummaging through the SUV, looking for something, officials said.

“Officers knew that Venzor-Gonzalez had been arrested in November for attempting to kill a police officer,” explained Archer. “They believed that the actions being made inside the car were efforts to locate a weapon. So fearing for their safety, the officers fired.”

Nguyen allegedly tried to drive down an embankment — in an attempt to get away — to no avail.

“Officers continued to see the occupants moving around inside, still looking for something, and so again they fired at the vehicle,” Archer said.

The cops pumped bullets into both Nguyen and Landeros, fatally wounding and injuring them, respectively.

Authorities later found a loaded handgun inside the car, which turned out to be stolen. The involved officers were placed on offline assignment and an internal investigation was opened into the incident. Venzor-Gonzalez still remained on the run as of 11:30 p.m. Thursday.

“He’s a very dangerous individual,” Archer said, adding that his criminal history “justifies” the cops’ actions.

“This is our top priority. The community’s not safe with him out there.”