A reputed gang member sprayed a police van with more than two-dozen rounds from an assault rifle last week after mistaking the unmarked vehicle and plainclothes officers inside for rival gang members, Cook County prosecutors said Monday.

The pair of officers had been following a minivan, in which the gunman was riding, and a Nissan Murano driven by other members of La Raza, for several blocks on the Southwest Side around 9 p.m. on May 2, before the officers gave up their chase and headed back to the 9th District headquarters.

But the gang members had noticed the unmarked van tailing them, and thinking the plainclothes cops inside were members of a rival gang, decided to turn the tables on them, prosecutors said at a bond hearing for 18-year-old Angel Gomez – the alleged driver of the minivan.

Yet another group of gang members in a Chevy Trailblazer pulled up alongside the van on Ashland near 47th Street, and the men inside stared down the officers, prosecutors said.

As the police turned onto 43rd Street, Gomez brought the stolen Town & Country minivan alongside the police van, and a man in the passenger seat opened fire with a .223-caliber “assault rifle,” Assistant State’s Attorney Jim Murphy said at Gomez’s bond hearing.

The gunman fired a few shots out the passenger seat window, then, unhappy with his vantage point, climbed into the rear of the minivan and slid open the side door to “get a better angle on the officers’ van,” Murphy said.

“Twenty-five shots were fired into the [police] van from a matter of feet,” Murphy said. “Bullets ripped through the van, spraying shrapnel all over both officers.”

The tactical police van that was shot at in the Back of the Yards neighborhood last week. Two officers were wounded as a result. | provided photo by Chicago Police

One officer, 26, was struck in the hip, arm and side. The second, 38, suffered lacerations to his upper back from gunshots.

Gomez, who was arrested Friday, was ordered held without bail on two counts each of attempted first-degree murder and aggravated battery with a firearm.

Murphy said Gomez, kept pace with the officers’ van even after bullets pierced the van’s gas tank, draining out the fuel and causing the van to slow.

The two officers eventually fired back through the front windshield, striking the tires and trunk of the minivan. With the tires flattened, Gomez lost control of the minivan, but managed to drive to an area near 37th and Morgan, where he and the gunman ditched it, Murphy said.

The shooter buried the rifle in a lot near some railroad tracks, Murphy said. The wounded police officers radioed for help, drawing squad cars— and the curious La Raza members in the Murano— to the intersection of 43rd and Ashland.

The two officers pointed out the Murano, which was stopped by fellow officers. The Trailblazer was spotted nearby and the passengers detained, Murphy said. A witness identified Gomez as the driver of the Town & Country minivan, and police surveillance cameras captured the shooting on video, Murphy said.

A surveillance camera at a gas station showed the shooter paying for gas for the minivan 15 minutes before the shootout, prosecutors said.

The officers had begun following the Murano and the minivan while investigating a gang shooting that occurred earlier near Halsted and Archer, and figured that the gang members in the minivan might try to retaliate.

Police reports indicate Gomez said he was a member of La Raza street gang, and police said at press conference Sunday that his fellow gang members identified him and the shooter.

Murphy said Monday that Gomez had given detectives a videotaped confession.