LOS ANGELES (Reuters) - Conan O'Brien will end his short-lived stint as host of "The Tonight Show" on Friday after signing a $45 million exit deal with NBC that ends two weeks of embarrassing on-air bickering and allows Jay Leno to return to the flagship late-night comedy program.
After more than a week of negotiations, General Electric Co's NBC said it had agreed to release O'Brien from his contract after seven months, and that he would be free to take a new job elsewhere after September 1.
"I'd like to apologize to the guests that were scheduled for next week: President Barack Obama, the Pope, the Queen of England, and our good friend, Elvis Presley," O'Brien joked during his show on Thursday.
The struggling network, already bottom of the four big U.S. TV networks and now the butt of jokes by its own and rival comics, said Leno will resume "The Tonight Show" on March 1.
Leno hosted the program for 17 years, making it the top-rated late-night talk show on U.S. television. He handed over to O'Brien in June 2009, only to see audiences slump.
"We're pleased that Jay is returning to host the franchise that he helmed brilliantly and successfully for many years," said NBC TV entertainment chairman Jeff Gaspin.
Media analysts expected it would take time for Leno, who has been painted as the villain in the drama, to recover the "Tonight Show" audience.
"It is going to be a long path to recovery for NBC. It is not going to happen overnight," said Marc Berman, a senior TV writer with Mediaweek.
NBC did not release details of the deal with O'Brien. But two people with knowledge of the settlement said that of the total amount, $32.5 million will go to O'Brien and about $12 million to his staff.
NBC said O'Brien would end his run on Friday with actors Will Ferrell and Tom Hanks as the last guests. The network will air reruns of his "The Tonight Show" next week ahead of its blanket coverage of the winter Olympics in Vancouver in February.
The reruns are not expected to include O'Brien's most recent shows, which included bitter lines like his "NBC is run by brainless sons of goats who eat money and crap trouble" joke on Tuesday.
News Corp's rival network Fox, which has no late night talk show, said last week it was interested in talking to O'Brien. But Fox on Thursday declined to comment on its plans.
Some media watchers have said Viacom's Comedy Central could be a good fit for O'Brien, whose humor appeals to younger viewers.
But Comedy Central, which is already home to popular news satirists Jon Stewart and Stephen Colbert, on Thursday declined to comment on whether it was interested in O'Brien.
NBC has been in turmoil since announcing the failure on Jan 10. of its five-month-old, cost-cutting experiment with "The Jay Leno Show" at 10 p.m. due to poor ratings and pressure from its local affiliates. The 10 p.m. hour is traditionally the home of scripted, expensive, drama on U.S. television.
O'Brien said he would not co-operate with NBC's plan to reshuffle its late-night line-up, effectively forcing a showdown between himself and Leno.
NBC's troubles came to a head a month after cable company Comcast Corp reached a deal to take a 51 percent stake in NBC Universal with GE owning 49 percent. The deal is subject to approval.
Additional reporting by Daniel Trotta and Christine Kearney in New York; editing by Anthony Boadle