It all happened on St Paul, Minnesota...

A raccoon in the US has become a global viral star after dramatically climbing a 25-storey-building.

It all unfolded at the UBS building in St Paul, Minnesota on Tuesday and into the early hours of Wednesday morning.

The saga began when the animal became stuck on a ledge, with local journalists reporting that it may have spent up to two days without food and water.

Despite efforts to rescue the raccoon, the situation escalated when the frightened animal moved to a neighbouring skyscraper and began its extraordinary climb.

Photos and videos from the scene showed the raccoon working its way up the tower.

People around the world began anxiously following the climb through the #mprraccoon hashtag.

Unfortunately for the raccoon and those watching the drama from inside the building and on the ground, the skyscraper's windows could not be open.

Picture by: Evan Frost/AP/Press Association Images

However, animal rescue teams placed traps with cat food on the roof in a bid to lure the raccoon to the top.

After a lengthy stop on the 20th floor - including a much needed nap - the raccoon resumed its climb on Tuesday evening.

Despite the dangerous final ascent, the raccoon safely reached the top of the skyscraper and was taken into the care of the local Wildlife Management Services.