A two-year-old bear who was stuck in a tree about 30ft off the ground on a Colorado university campus was tranquilized before falling to safety.

The male bear had climbed up the tree on the University of Colorado Boulder campus on Friday, next to Cockerell Hall, and was spotted by university police at 7am.

Colorado Parks and Wildlife officers sedated the bear who after a short wait landed onto the padded mats. The animal was unhurt and was to be relocated in the mountains in Boulder or Larimer counties, the university said.

Scroll down for video

A tranquilized bear falls from a tree after being darted by Colorado Department of Wildlife officers on Friday morning on the University of Colorado campus in Boulder (pictured above the moment the bear fell from the tree)

The male bear had wandered up the tree on campus on Friday, next to Cockerell Hall, and was spotted by university police at 7am (the animal pictured as it peers through the tree)

The bear was perched in the tree about 30ft off the ground for nearly four hours until wildlife officers tranquilized it just before 11am, the Boulder Daily Camera reported.

The baby bear had climbed higher up the tree after being scared when officers arrived at the scene, according to 9 News Denver. Officials said his reaction, while normal, made it more difficult to rescue him.

Photos from the scene captured the bear with his paws out stretched as he fell onto the mats while a group of students looked on.

After he was tranquilized and hit the mats below, he rolled onto the ground and briefly lifted his head up at the officers before falling asleep.

He did not appear to suffer injuries during the fall, wildlife officers said.

Colorado Parks and Wildlife tranquilized the bear as he was perched in the tree around 30ft off the ground, and eventually fell onto padded mats (scene from the incident as people on campus look on as the bear falls around 30ft)

The bear, weighing about 60 pounds, had to be tranquilized and relocated because it was in the middle of a crowded campus, said Jennifer Churchill, a spokeswoman for Colorado Parks and Wildlife

The bear, weighing about 60 pounds, had to be sedated and relocated because it was in the middle of a crowded campus, Jennifer Churchill, a spokeswoman for Colorado Parks and Wildlife, told the Daily Camera.

She said the bear was going to have a hard time getting out of the tree on his own.

During the incident, several campus departments responded to the scene to make sure the area was kept safe, according to the university.

Friday's incident is similar to one three years ago, when a 200-lb black bear had climbed about 15 feet into a tree near the University of Colorado’s Williams Village dormitories.

Colorado University police decided to also tranquilize that bear because of his close proximity to students and the potential danger that held.

The bear did not appear to suffer any injuries during the fall, wildlife officers said (pictured, the bear as it is carried by rangers to a trailer)