Ryan Seacrest performed on 'American Idol' last night (21.05.14).

The 39-year-old star - who has fronted the talent show since it began in 2002 - took to the stage on the show's finale for a surprise musical performance, which was introduced by programme mentor Randy Jackson.

Wearing a tuxedo, Ryan sang Richard Marx's classic ballad 'Right Here Waiting' - which quickly turned into a duet when the curtains rose to reveal the crooner and the two performed together at the piano.

Speaking afterwards, Ryan jokingly told the audience: ''I apologise. [That was my] moment in the sun.''

Judge Harry Connick Jr. claimed the performance would trigger a new career direction for the host.

He joked: ''My prediction? You're going to have a record deal before this night is over.''

Ryan replied: ''I hope not.''

Despite his successful TV career, it seems the presenter wasn't comfortable with singing.

He had tweeted before the show: ''I've never been nervous on the idol stage before...tonight it's very different. Watch this. #idolfinale (sic)''

Other musical performers on the two-hour show included Aloe Blacc, programme judge Jennifer Lopez, Demi Lovato, John Legend and Lady Antebellum.

Finalists Jena Irene and Caleb Johnson performed with Paramore and Kiss respectively, and the evening ended with Caleb crowned the winner.

He attempted to sing his debut single, 'As Long As You Love Me', but quickly got swept away with the emotion of the night and abandoned the performance to hug his fellow contestants.