Dennis Ofuoma was arrested Monday for four attempted rapes over four hours, police said. View Full Caption Composite: NYPD

BROOKLYN — The teen accused of four attempted rapes in Crown Heights had been released from jail just a week earlier for a robbery on Staten Island, officials said Tuesday.

Dennis Ofuoma, 19, who's originally from the United Kingdom but lives in the Tremont section of The Bronx, followed four women into their buildings and tried to rape them in separate incidents over four hours spanning July 12 and 13, police said.

In all four cases, the women fought him off and he fled, authorities said.

He was arrested Monday for burglary, sexual abuse and harassment, police said. He hadn't been arraigned as of Tuesday morning, according to records and the Brooklyn District Attorney's office.

It wasn't immediately clear what lead to Ofuoma's arrest, but police had initially struggled to find him, repeatedly sending out several videos in hopes of drumming up leads.

On April 2, he was arrested for "false personation" in The Bronx after he gave the wrong name to police, records show. He was released later that day.

On June 30, he was arrested for stealing someone's cellphone on Staten Island, taking it from his victim as the person tried to call 911, court documents show. He was initially held on $2,500 bond in that case, records show, but Judge Raja Rajeswari released him six days later.

Ofuoma's attempted rape spree began when he followed a 22-year-old woman to her apartment door at Nostrand Avenue and Pacific Street at 11:45 p.m. on July 12, police said. Just over an hour later, he went after a 29-year-old woman inside a building at St. Marks and New York avenues, according to the NYPD.

At 2 a.m., the suspect followed a 22-year-old woman to her apartment inside a building near Albany Avenue and Sterling Place and pushed her inside when she opened the door, police said. He told her he had a knife and would kill her if she wasn’t quiet, but the woman kneed him in the groin and he fled, officials said.

The fourth attempted assault took place at 3:36 a.m., when Ofuoma followed a 32-year-old woman into an elevator inside a building at Pacific Street and Nostrand Avenue, police said. He put his hand over her mouth and tried to drag her to the ground, but the woman punched and kicked him, causing him to flee, police said.