A Brooklyn man on the run since last week when an NYPD sergeant shot him after an attempted auto larceny was arrested Wednesday, officials said.

Arthur Whaley, 25, of 330 Lexington Ave. in Bedford-Stuyvesant, Brooklyn, was taken into custody in Harlem on charges of grand larceny, reckless endangerment, criminal mischief, menacing and criminal possession of a weapon, the NYPD said.

Police didn't say how Whaley was located or his condition.

photosRecent NYC mug shotsDataNYC crime rates

The shooting took place in the early morning last Friday after a plainclothes sergeant from the 70th Precinct in an unmarked car encountered two men removing the tires of a 2015 Honda Fit on East 19th Street near Glenwood Road in Brooklyn.

advertisement | advertise on newsday

As the sergeant approached, the two suspects fled in separate cars, police said. The sergeant stayed at the scene while two other officers followed them.

Moments later, Whaley and another man, identified by police as Corey Prescod, 26, of 703 E. 37th St. in the Flatlands area of Brooklyn, arrived at the scene in another car, according to the NYPD, in an attempt to retrieve items left behind.

Officers saw the pair, police said, and as the two suspects tried to flee, their car struck an unoccupied vehicle on East 19th Street, police said. The sergeant pulled up next to the car and ordered Whaley and Prescod to remain inside, police said. Whaley instead exited through a window -- and pulled a knife, police said.

The sergeant then fired one shot, striking Whaley after he refused orders to drop the knife, police said. Whaley then fled, and Prescod was arrested at the scene without incident, police said.

Prescod is charged with grand larceny, auto stripping and other crimes, according to police.