A murder suspect who escaped from a Brooklyn police precinct yesterday by asking a cop for a bathroom break was captured today by cops hiding out in a friend’s Bronx apartment, the NYPD said.

Brandon Santana, 24, was apprehended at 3:15 p.m. at 3930 Third Avenue by NYPD officers and the Regional Fugitive Task Force, about 37 hours after he ran, un-handcuffed, from the 78th Precinct in Park Slope after knocking down a cop escorting him to the toilet.

Police said that the girlfriend of Santana’s friend opened the door when they arrived, and she told them that a pal of her boyfriend was staying there.

Cops found Santana standing in the bedroom, and took him into custody without incident, according to the NYPD.

Santana is suspected of repeatedly bashing 22-year-old dad-to-be Alexander Santiago with a lead pipe during a gang assault on the man and three of his friends at 12th Street and Fifth Avenue in Park Slope on Aug. 1, 2010.