A racoon which became an international celebrity after scaling a 25-storey office tower has been safely trapped and released back into the wild.

Footage of the creature's escapade went viral as it scaled the UBS Plaza in St Paul, Minnesota.

Many Twitter users voiced concern for its safety or joked about the drama as its death-defying climb was livestreamed by several broadcasters.

It looked bedraggled but healthy after it was caught before dawn.

A raccoon sits on a window sill of the UBS Plaza building in St Paul, Minnesota (Paige Donnelly Law Firm/via REUTERS)

Technicians took the caged racoon down a freight elevator to a truck, according to Wildlife Management Services, which provides animal control services for the city.

“It’s definitely a healthy racoon. It’s in good condition. It’s eating normally,” said Christina Valdivia, the company’s general manager who accompanied the technicians to the rooftop.

The racoon spent much of the day going up and down the tower’s exterior.

A raccoon scurries up the side of the UBS Plaza building in St Paul, Minnesota (Evan Frost/MPR News/via REUTERS)

It was initially thought that it climbed to a lower part of the building, which is frequented by pigeons, in search of bird eggs.

But after workers tried to lure it down with a wooden ramp, they may have scared it into making the climb.

Evenutally, it made it to the roof, where traps baited with cat food were waiting.

The raccoon that scaled the UBS Plaza was caught in a live trap baited with cat food overnight in St Paul, Minnesota (Evan Frost/Minnesota Public Radio via AP)

The animal was later released on private property near the Twin Cities suburb of Shakopee.

Minnesota Public Radio, which broke the story and closely followed the racoon’s climb from its headquarters less than a block away, branded the animal #mprraccoon.

“This poor raccoon apparently got itself stranded on a ledge of the Town Square office building in downtown St Paul, likely on an errant mission to raid pigeon nests on the skyway over 7th Street. It’s been there for two days now, without food or water,” Minnesota Public Radio reporter Tim Nelson wrote on Twitter.

The racoon’s odyssey was watched with trepidation and excitement on social media.

“There’s something tragic and inspiring about a poor, starved, and dehydrated raccoon refusing to give up and scaling a high rise building just to survive. Life is precious and worth fighting for,” one Twitter user wrote.

Another said: “The [racoon] is the perfect 2018 metaphor.”