A teenage gang member who said he was bored and wanted to fire his gun shot at two police officers as they sat in their squad car, missing them but striking their vehicle several times, authorities said Friday.

The officers never saw who was shooting at them on the night of July 25, but an extensive investigation determined the bullets' trajectory and the type of gun used; investigators also spoke to prisoners who had heard rumors about the shooting, steering them to the teenager.

Malo Dashaunta Gomez, 18, of Minneapolis, who eventually admitted to the crime, was charged Friday with two counts of first-degree attempted murder and two counts of first-degree assault.

Gomez was jailed Tuesday afternoon, according to jail records. His bail amount was set at $1 million.

The Hennepin County attorney's office did not release the names of the officers involved.

According to the criminal complaint:

The two officers were seated in a squad car about half an hour before midnight near 3219 Penn Av. N. They were in a brightly lit area, their squad's light bar was lit and the interior lights of the squad car were on.

The officer in the driver's side heard bullets strike his side of the vehicle, and the officer in the passenger side looked back to see "unknown objects" in the air coming toward the squad, apparently the bullets.

Neither officer was injured, but their squad was hit in the driver's door and in the rear, with more bullet strikes possibly in the driver's rear quarter panel, the trunk and the underside of the rear bumper. An extensive search using dogs could not locate the shooter.

Officers found bullet casings nearby after trajectory tests showed where the shooter would have been standing. Officers with the Hennepin County Violent Offender Task Force, meanwhile, picked up rumors that Gomez was bragging about the shootings.

A prisoner at Red Wing Correctional Facility confirmed the rumor, and investigators talked to Gomez, who was in Hennepin County jail on unrelated charges.

Gomez, who lives about a block from where the shootings occurred, initially denied involvement but then admitted to it after further questioning, authorities said.

He said he shot from the location where the casings were later found, and he said he used a Hi-Point 9-millimeter gun, a handgun that uses the type of casings that were found, according to court documents. He told authorities that he threw the gun into the Mississippi River.

Gomez said he had no reason for shooting at the officers, "I was bored ... wanted to shoot the gun off," he said, according to court documents.

Matt McKinney • 612-217-1747