A man armed with a rifle who climbed onto the roofs of homes after a police chase, then barricaded himself in a home for several hours Monday, was wanted on seven felony counts including stalking and criminal threats, authorities said.

A complaint for an arrest warrant says Nolan Perez, 41, faces the felony counts for the alleged crimes between May 19 and June 6 against a woman believed to be his ex-girlfriend.

Monday’s incident began after police tried to arrest Perez on that warrant. He took off on a high-speed chase that ultimately ended in a San Fernando Valley neighborhood with the barricade situation. Authorities shut down nearby freeway ramps, locked down schools and evacuated at least one as police waited him out.

Five hours after the chase began, SWAT officers fired a gas canister into the home, and television reports showed the man walk out with his hands up and lie face-down on the grass in the backyard with his hands behind his head and two dogs nearby. Seven SWAT officers converged to take him into custody.

Additional charges are expected to be filed against Perez, who has multiple prior convictions including for domestic violence, negligent discharge of a firearm and firearm possession as a felon.

The chase began at about 10:15 a.m. when police tried to arrest Perez but he drove off in his red Nissan Altima, leading to a 45-minute chase along several freeways that ended in North Hollywood, police said.

The man was dressed in white and carrying what appeared to be an assault-style rifle. He pointed it at his pursuers several times during the chase, but police were investigating whether he fired it, Cmdr. Andrew Smith said.

The man walked through several backyards and at one point climbed onto a roof, jumping from one to another, pacing along the spine and stopping to lean on the rifle multiple times before he climbed down and entering a home, police said. He was believed to be alone inside, Smith said.

A preschool and about a half-dozen elementary, middle and high schools were locked down. Most schools are out of session for summer, but two campuses had a total of about 135 students who would be picked up by their parents, authorities said.

Shortly before 2 p.m., dozens of students from a nearby private school were evacuated to a park to meet their parents, holding hands, lugging backpacks and walking under a freeway overpass as police guarded them.

All of the lockdowns were lifted about four hours into the standoff, Smith said.

Join our Newsletter for the latest news right to your inbox