The Philadelphia narcotics officer who fatally shot a suspect during a confrontation in Tacony in August — an action the Attorney General’s Office declared this month was justified under the law — shot and wounded another man under similar circumstances in 2012, according to department records.

The documents also say that the officer, Richard Nicoletti, a 29-year veteran of the force, had four prior "firearm discharge incidents” before the 2012 shooting. The documents do not detail those incidents, but Police Commissioner Richard Ross said they involved dogs, not people.

The records were compiled by the department’s Internal Affairs Division as it reviewed Nicoletti’s conduct six years ago, and were shared at the time with public defenders who represented the man shot by the officer, Maurice Chelteham. The Defender Association of Philadelphia found them in its files and made them available to the Inquirer and Daily News this week.

“We just feel it’s important that the public be informed,” said Michael Mellon, a lawyer from the association.

Lee Merritt, a lawyer for the family of the man killed this year, Jeffrey Dennis, said the records show a problematic pattern of behavior by the officer.

“What was particularly frustrating about it, the family has encouraged the state to press criminal charges against [Nicoletti] ... and none of that information was made available,” Merritt said.

Joe Grace, a spokesperson for Attorney General Josh Shapiro, declined Wednesday to offer specifics on the office’s review of the Aug. 20 shooting on the 7100 block of Hegerman Street. But he said: “We conducted a complete and thorough investigation into this matter, including a full review of the officer’s personnel file, and considered all relevant information before making our decision.”

Police have said that Nicoletti and a group of plainclothes officers had been preparing to raid Dennis' nearby house on a drug warrant but came upon him in a Toyota Camry. According to surveillance video released by state prosecutors, the officers parked their unmarked police vehicles around the Camry, boxing him in when Dennis, 36, rammed the cars while trying to drive away. Dennis remained behind the wheel when Nicoletti fired several point-blank shots, killing him.

Six and a half years earlier, Nicoletti had been working with narcotics officers when, according to Internal Affairs documents, they went to another site in Tacony — 6300 Edmund St. — to buy drugs from Chelteham, who was seated inside a 2011 Toyota Corolla with another person, the documents indicate.

After officers parked their unmarked cars in front of and behind the Corolla, Chelteham drove in reverse into one of the unmarked police cars, according to documents, then drove toward two officers, at which point Nicoletti fired a shot that struck Chelteham in the left side. Chelteham — found with four packets of heroin, according to the documents — survived and was charged with aggravated assault, simple assault, and related counts. He later pleaded guilty to lesser charges and received a 1½- to three-year prison sentence, according to court records.

A witness, whose name was redacted in the documents, told police that she saw several men pointing their guns at the Corolla, and “saw one of the guys shoot at the car.” She did not know that the men who surrounded Chelteham were police officers, her statement said.

The records show that Sgt. James Shuck of the Narcotics Field Unit told Internal Affairs at the time that he was on the scene, and that he believed the officers were “20 to 25 feet” away from the suspect when Chelteham started driving toward them and Nicoletti shot him.

Chelteham — whose name is also spelled Cheatham in the Internal Affairs files — was hospitalized in critical condition after that incident. He was unavailable for comment Wednesday, imprisoned on a drug case from 2015, according to court records.

It was not clear Wednesday night whether Nicoletti had been disciplined over that 2012 shooting or any of the others cited in his files.

Current police directives generally prohibit officers from shooting at people in cars. They also instruct officers not to box in fleeing cars by surrounding them with police vehicles. Neither of the men shot by Nicoletti was accused of having weapons during their encounters with police.

Ross said the Police Board of Inquiry held a hearing Tuesday to discuss whether Nicoletti should be disciplined for shooting Dennis. That decision is pending. He has been put on desk duty pending the investigation; attempts to reach him by phone Wednesday were unsuccessful.

John McNesby, president of Fraternal Order of Police Lodge 5, said Wednesday that he did not know the facts of the 2012 case, but that he did not believe Nicoletti should lose his job over the August incident.

“It’s unfortunate someone lost their life that day, but we’re out there doing work that a lot of people don’t want to do,” McNesby said.