Someone placed candles where Jermaine Johnson was fatally shot by police in the Cooper Park Houses. View Full Caption DNAinfo/William Mathis

EAST WILLIAMSBURG — The gunman who was killed in a shootout with police Sunday morning told his mugging victims in the Cooper Park Houses that he thought they were federal agents — including one man sitting on a bench brushing his dog, they said.

Jermaine Johnson, 42, had a gun tucked in his waistband and was roaming the housing project on Debevoise Avenue about 7:45 a.m. when he came upon Bruce Polite, 63, who was exercising in a courtyard of the building, Polite said.

"He said he knows I'm a federal agent. He dumped out my stuff out of my backpack," said Polite, who lives on Morgan Avenue.

"He took my phone and threw it on the ground. If he wanted to shoot me, I would've been dead. I didn't show him any aggression or any aggressive type movement," Polite said.

Johnson seemed solely focused on his perceived the threat of federal agents, he said.

"He wasn't rational. He didn't take my watch, didn't take my wallet. He didn't take my money," Polite added.

Eventually, Johnson, who's been arrested nine times and spent six years behind bars on weapon and gun charges, left Polite and wandered over to Hector Ortiz, 65, who was taking a break from his pug Mauricio's daily walk to brush the dog on a bench.

"He came running and put the gun against my head and said, 'You're a federal agent.' He had the gun in one hand against my head and with the other hand, he was looking in my pocket for a federal agent ID," said Ortiz, who's lived nearby for 24 years.

"I was struggling, trying to save my life for 15 minutes," Ortiz added.

Johnson took Ortiz's glasses, keys and phone, which he broke into pieces, Ortiz said.

"He wants to kill my dog. He wants to kill him. He was crazy. He thought I was part of a federal operation. He was talking about being chased by the federal agents. ... He thought my dog Mauricio was part of the operation," Ortiz said.

The gunman escorted Ortiz inside, hoping to get up to Ortiz' family so he could massacre them, Ortiz said. But Johnson abruptly changed his mind and shoved Ortiz to the ground before running back outside, Ortiz said.

There, two officers from the nearby 94th Precinct spotted Johnson outside 20 Debevoise St., NYPD officials said.

Johnson fired five shots prompting the officers to fire a salvo of about a dozen bullets, hitting him twice, police said.

Johnson, of Clinton hill, was pronounced dead at Woodhull Hospital, police said.

The two officers were taken to Elmhurst Hospital for observation, officials said.

NYPD officials initially said that Johnson had pistol-whipped one of two people he robbed at gunpoint, but neither Ortiz nor Polite said he hit them.

He was convicted in 2000 for criminal possession of a weapon and a controlled substance for which he spent the next six years in prison, records show.

He was arrested again in May 2010, but an NYPD spokeswoman didn't have any further information about the crimes he'd committed.