The Rochelle Park Police were able to foil a burglary attempt in an unusual way on Thursday night after a homeless man who broke into a home mistook a police vehicle for a Lyft car he had ordered.

The department received a 9-1-1 call from the owners of Catherine Street home at 10:01 p.m., who said they awoke to the sound of someone trying to open their back porch door, police said in a news release.

The couple then investigated and found a man, later identified as 28-year-old Nicholas Maziot, inside the second floor of their home, officials said.

When he was spotted, Maziot fled out the window and jumped from the roof to the ground.

Police from Rochelle Park, Maywood and Paramus responded and spotted Maziot leaving the backyard of an Oldis Street home just one block away, authorities said.

Maziot had summoned a Lyft driver at some point between fleeing the Catherine Street home, which arrived at the same time as the officers and he mistakenly got into Maywood Officer Brian Rubio’s car, police said.

Police then arrested Maziot, who later told them that he thought that nobody was inside the home he entered.

Maziot was charged with burglary, criminal mischief, hindering apprehension and other offenses, according to a news release.

He was sent to the Bergen County Jail where he awaited his first court appearance.

Chris Sheldon may be reached at csheldon@njadvancemedia.com. Follow him on Twitter @chrisrsheldon Find NJ.com on Facebook.

Have a tip? Tell us. nj.com/tips

Get the latest updates right in your inbox. Subscribe to NJ.com’s newsletters.