Usain Bolt brought the curtain down on his Olympic career with a record-equalling ninth gold medal on Friday, anchoring Jamaica to relay glory in a perfectly scripted finale to complete his unprecedented "triple-triple."

The 29-year-old superstar, widely seen as the greatest sprinter in history, stormed over the line in 37.27sec to trigger an eruption of adulation in the Olympic Stadium.

And he later tweeted: 

Japan's quartet took a surprise silver in 37.60sec while Canada took bronze after the United States, who crossed in third, were later disqualified.

The victory saw Bolt complete a third consecutive clean sweep of the 100m, 200m and 4x100m titles following his six gold medals in the 2008 and 2012 Games.

It leaves Bolt -- who will retire in 2017 -- level with Carl Lewis and Paavo Nurmi on a total of nine Olympic gold medals, a record for a track and field athlete.

"I'm going to stay up late and have fun," Bolt said. 

"I never knew this would happen when I started out," added Bolt, who lingered on the track after his lap of honour, kneeling down to kiss the finish line as chants of "Usain Bolt, Usain Bolt" echoed from the stands.

The relay gold was the final act of an incredible Olympic career that redefined athletics and often left commentators scrambling to find a new vocabulary of superlatives as each new milestone came and went.

On Sunday Bolt became the first man in history to win a hat-trick of 100m gold medals.

He then followed that up with Thursday's barnstorming win in the 200m, sealing another never-before-seen treble.

Asked for the secret to his phenomenal career, which encompassed 20 gold medals in world and Olympic championships, Bolt replied simply: "Dedication. I wanted it the most. I was never satisfied."

Friday's triumph was potentially the most awkward, with Bolt's gold medal hopes reliant on the performances of his team-mates.

But Asafa Powell, Yohan Blake and Nickel Ashmeade were in no mood to fluff their lines.

A superb third leg by Ashmeade ensured that Bolt had a precious lead after the final changeover.

From that point there was only ever going to be one outcome and Bolt powered home by three metres to universal delight.

"We wanted to win to make Usain immortal and he is immortal," Blake said. "I've told him he should come back for 2020!"

Bolt will now set off a year-long victory tour that will culminate with the World Championships in London next August.