The incident began in Passaic, with police responding to a domestic dispute call on South Street and 9th Street.
When they arrived, the suspect fled in a white van. Officers gave chase into Garfield, where the suspect crashed and fled on foot through backyards.
Polices say that at one point, he unsuccessfully tried to carjack someone.
Investigators went door to door in a 4 block radius and could not find him. The search was called off around 2:00 p.m.
Then, the suspect, who still hasn't been identified, was found hiding inside 95 Palisade Avenue at around 5:30 p.m.
City officials say the suspect broke the lock on the front door of a 2nd floor apartment at that address.
He locked the homeowner's dog in one of the rooms and then hid in the attic. The dog is fine.
When the homeowner got home and saw the broken lock, he called police.
Police searched the apartment, and when they went to open the push-up attic door, they couldn't.
The suspect was sitting on it, preventing them from getting in.
Police eventually talked the man out and he was taken into custody.
Charges are pending.
Deputy Mayor Tana Raymond says the police did a wonderful job apprehending this man.