The NYPD says they have arrested a man they say tried to sexually assault four women within hours of each other in Brooklyn earlier this month.

Police say they do not have details of how the man was arrested, but they say he is the same person seen in footage released in connection to the incidents.

The attacks happened across a four-hour span on the evening of July 12 and the early-morning hours of July 13, according to officials.

Police say the man seen above followed a 22-year-old woman to her apartment near Lincoln Place and Albany Avenue in Crown Heights around 2:30 a.m.

They say he pushed the woman to the ground, told her had a knife and threatened to kill her, and tried to sexually assault her, but they say the woman managed to fight him off before the man fled.

Police say the man had committed similar attacks on three other women at nearby buildings between about 11:45 p.m. on July 12 and about 3:30 a.m. on July 13. The man held his hand over the victims' mouths in these three attacks, according to police.

Police say he also touched one of the victims' genitals in one of the attacks.

In each of those attacks, police say the man fled after the women fought back.