A mountain lion that eluded authorities for hours in Brentwood was finally captured in the backyard of a home Thursday afternoon.

Los Angeles police officers responded to Gretna Green Way and San Vicente Boulevard around 10:30 a.m. when the big cat was first spotted.

Nearby Brentwood Science Magnet was placed on lockdown and police cordoned off an area lined at the Brentwood Country Club as they searched for the cougar, aerial video from Sky5 showed.

California Fish and Wildlife officials also responded to the scene.

Sky5 finally got a glimpse of the big cat around 1:25 p.m. when it was seen running out of bushes and toward the golf course.

Wildlife officials finally captured the puma in the backyard of a home where it passed out after being shot twice with tranquilizer darts.

The healthy adult mountain lion was taken away in a pickup truck. It had not been collared or tagged, but it will eventually be released into the Angeles National Forest, officials said.

Fish and Wildlife Lt. Jake Coombs said getting the cougar into custody was “challenging.”

“Anytime wildlife goes backyard to backyard, it’s definitely going to present unique challenges, especially as densely populated as this residential community is,” he said.

Tiffany Yap, a senior scientist at the Center for Biological Diversity, said in a statement Thursday that while it might be “alarming” to see wildlife in a neighborhood, the mountain lion is the most scared.

“Cougars like the one captured today tend to avoid homes, schools and places where there are people,” she said. “When they do make an appearance, it’s often because what’s left of their habitat has been lost or fragmented by roads and development.”