This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A felon who barricaded himself inside a North Hollywood home — prompting a massive police response and the evacuation of nearby schools and homes — surrendered and was taken into custody after an hourslong standoff that started as a high-speed freeway pursuit Monday.

The incident began in the 4900 block of Axtell Street in El Sereno (map) at about 10:15 a.m., according to Officer Wendy Reyes of the Los Angeles Police Department.

The driver, later identified as 41-year-old felon Nolan Perez, was wanted for making criminal threats when he was spotted by authorities and took off in a red Nissan Altima, Reyes said.

The driver took to several Los Angeles-area freeways, including the 5, 10, 101, 110 and 170, as he attempted to elude authorities, aerial video from Sky5 showed.

The car appeared to be traveling at a high rate of speed during portions of the pursuit and nearly collided with other vehicles as the driver tried to navigate the freeway traffic, video showed.

At one point during the pursuit, the driver held what appeared to be an assault rifle out of the car window.

At about 11:30 a.m., he exited the vehicle with the weapon and began to walk through a residential neighborhood in the North Hollywood area.

A few minutes later, the man was spotted on the roof of a home (map). Area residents were asked to stay inside because the man was armed and dangerous, according to a tweet from the LAPD.

After pacing back and forth on the roof, the man eventually climbed down and went inside one of the homes in the neighborhood, on Hartsook Street.

“We’re very confident the suspect is contained at this point,” Lt. Andy Neiman of the LAPD stated just after 1:30 p.m., adding that investigators did not believe that anyone else was in the home at the time.

A SWAT team was brought into the area and was preparing for a standard barricade situation, according to LAPD Cmdr. Andy Smith.

“We’ll do whatever we can to get this guy out peacefully, without hurting him or certainly without hurting any member of the public,” Smith said.

A perimeter was set up in the area, and some homes were evacuated, Smith said. K-9 officers and a bomb squad robot were deployed.

Nearly five hours after the incident began, authorities fired tear gas into the home and the man exited through a sliding door, aerial video showed. He appeared to coughing as he came out of the home and staggered across a patio area.

He was lying face down in the grass when authorities finally took him into custody at about 3 p.m., video showed.

He was eventually searched and then placed into a patrol car and officers entered the home.

Late Monday afternoon, Perez was identified by police sources, who said he was wanted in connection with alleged threats against his ex-girlfriend.

A man with that name and age has a long list of prior convictions, according to Los Angeles County court records, including spousal abuse, DUI, being a felon in possession of a firearm, hit-and-run and negligent discharge of a firearm.

There was a seven-count felony warrant for the arrest of a 41-year-old Nolan Perez issued on Monday, a spokeswoman for the Los Angeles County District Attorney’s Office said.

The complaint listed three prior convictions: spousal or cohabitant abuse, being a felon in possession of a firearm and negligent discharge of a firearm.

Perez was wanted on suspicion of felony stalking and six counts of making criminal threats on separate occasions beginning May 19, according to the complaint.

The incident impacted many of the area schools, which had to be placed on lockdown.

“Valley Village seems to be under siege right now. There’s a lot of anxiety going on,” said Christopher Doyle, a parent at Colfax Elementary, which was evacuated.

After being locked down for several hours, students from Oakwood School were taken to North Hollywood Park (map) where parents were allowed to pick them up beginning about 1:30 p.m.

KTLA’s Melissa Pamer, Steve Kuzj and Kareen Wynter contributed to this article.