A brave undercover cop single-handedly took more than 150 illegal guns off Brooklyn’s streets in a risky yearlong probe that also busted a brigade of dealers.

The unidentified cop was so talented at playing his role that traffickers often fought each other for his business, Police Commissioner Raymond Kelly said Thursday.

“This undercover officer was particularly skillful and he appeared to have money. And other people tried to undercut the original seller [and] cut their own deals,” Kelly said.

“There’s no honor among thieves. The undercover officer did an amazing job.”

During “Operation Phoenix,” the lone officer, who cannot be identified for safety reasons, broke up a virtual pipeline of arms into Brooklyn – buying 153 weapons in 105 transactions at an average cost of $900 each.

Two of those guns were linked to murders in the borough, including the senseless slaying of a teenage Rollerblading phenom.

“It goes to show the magnitude of the problem we have with guns on the streets of the city,” Kelly said.

Seventeen people were arrested in the investigation – which was run jointly by the NYPD and the Brooklyn district attorney’s office. Three more suspects are being sought, officials said.

The investigation began last May and initially focused on Stevenson [Teeth] Alexis, 25, who was selling guns in East New York, officials said.

After the undercover cop earned Alexis’ trust, he was introduced to a loose-knit group of weapons dealers throughout Brooklyn – and ended up buying guns in 11 of the borough’s precincts.

Alexis, who sold the cop 53 guns, was tracked down through his probation officer and busted this week. He is being held on $1 million bail, Brooklyn District Attorney Charles Hynes said.