A mountain lion that made a couple of appearances in recent days in San Francisco and Daly City was finally captured Wednesday night and is being returned to the wild.

The mountain lion — presumably the same one — was spotted early Tuesday in Bernal Heights Park, and caused a bit of alarm in the neighborhood. But now everyone can breathe easy knowing that the wild animal has been taken back to the Peninsula where it belongs.

As KTVU reports, the cougar was spotted up in a tree near the intersection of Mission and Santa Marina streets, and around 10:30 p.m. on Wednesday personnel from the California Department of Fish and Wildlife came to tranquilize and capture him/her.

SF Animal Care & Control tweeted the photo below of the operation in progress.

After the initial Bernal Heights sighting on Tuesday, surveillance camera footage emerged by Wednesday of the mountain lion roaming around neighborhoods in the Portola District and in Daly City. And as a rep for SF Animal Care & Control said on Tuesday, these camera sighting are more common than you'd think — since mountain lions are pretty good at skulking around at night without actually being seen by people, and they wander up from the Peninsula woodlands on the regular.

As we learned last June, when a juvenile male mountain lion was seen wandering around Russian Hill and the Embarcadero, juvenile males tend to do some roaming far afield of where they were born, as they go in search of their own territories. Unfortunately, that means juvenile males are the ones most frequently hit by cars when they wander onto roadways — which is exactly what happened to the mountain lion that toured SF last year. He was found dead by the side of Highway 1 in Pacifica a few weeks later, after being returned to the wild.

This mountain lion was taken to the Oakland Zoo last night, as the Chronicle reports, and will be released into the wild somewhere today — but it's not clear where.