VANCOUVER -- Conservation officers have tranquilized and relocated a black bear that was caught on camera headed toward downtown Vancouver Wednesday afternoon.

Thomas Cook was working on the Centennial Road overpass construction project at the Port of Vancouver Wednesday when the bear passed by on the train tracks below him.

"I did a quick look behind me because I kind of saw something out of the corner of my eye," Cook told CTV News Vancouver in a phone interview. "Sure enough, there's a bear running down the tracks."

Cook moved to Vancouver last year after living in Toronto for most of his life. He said he's seen bears in Ontario, but this was the first one he had encountered since moving to B.C.

"I thought that was the coolest thing ever, because it's just here in the middle of the city and there's a bear wandering down through it on its way to Gastown," he said.

Craig Minielly, a professional photographer, started filming from his apartment window when he heard commotion outside.

“There was one guy yelling, another had a gun and one of them was throwing rocks and I was trying to figure out what was going on,” Minielly said. “That’s when I looked down and there was a bear right below me, it was on the tracks.”

Conservation officers were able to immobilize the bear and relocate it to the Sea-to-Sky region, according to an email from B.C.'s Ministry of Environment and Climate Change Strategy.

Brittany Mueller with the Conservation Officer Service says the animal was a two-and-a-half-year-old male and may have wandered from the Burnaby Mountain area.

“He was a healthy young black bear in really good condition and what we believe ... happened is it was following along green spaces or green belt that eventually led it into a high-use urban setting,” Mueller said. “I think he was just roaming through looking for food sources and ended up in the wrong place.”

Parts of the bear’s adventure were also documented on social media. A time-stamped security camera video posted to Twitter shows the animal walking along the fence line of a home.

Scott Bartlett, a professional dog walker, also captured photos of the bear near the Second Narrows Bridge. At the time he had about seven dogs in the back of his pickup, but says luckily, the animals didn’t notice each other.

“I pulled over to respond to some messages and I looked up and there was a bear about five feet from my driver side window,” Bartlett said. “He kind of rolled around a little bit and took off toward the PNE. It’s definitely not something you would see in this neighbourhood for sure.”

Mueller says bear sightings in the downtown area are extremely rare, but they do happen. She believes the last time conservation officers were called to remove one in 2011 when a black bear, likely looking for food in a dumpster, accidentally ended up in a garbage truck on Cambie and West Georgia.

“It doesn’t happen very often so when it does happen, like in this case, it’s good for us to be aware right away,” Mueller said.

It seems Vancouver isn’t the only place the black bear is making news. Minielly says once he posted his videos to social media, his phone started “buzzing off the table” with calls from Germany, Sweden, U.K., France and “a few other spots” with news outlets eager to speak with him.

Minielly says he’s previously photographed polar bears in the arctic but seeing a bear in the city felt like he was in the “right place at the right time.”