David Letterman said he had handed over a "phoney" cheque for $2m
A US television producer has pleaded guilty to attempting to blackmail US chat show host David Letterman over his sexual affairs.
Robert Halderman was charged after threatening to reveal all unless paid $2m (1.47m euros).
The attempt prompted Mr Letterman to make an on-air confession about his affairs with production staff.
Mr Halderman's lawyers had initially claimed he was attempting to sell the comedian a thinly veiled screenplay.
Letterman 'extremely grateful', says lawyer
Appearing in front of New York State Supreme Court, Mr Halderman agreed to a plea bargain in which he will serve six months in prison, perform 1,000 hours of community service and give up his right to appeal against his conviction. He will be formally sentenced in May.
He could have faced up to 15 years in prison had he gone to trial and been convicted.
"In September of 2009, I attempted to extort $2 million from David Letterman by threatening to disclose personal and private information about him, whether true or false," Mr Halderman, 52, told the judge.
In a statement to the court, the former producer apologised to both Mr Letterman and his family and acknowledged that he had delivered a threat, in the form of a script idea, to the chat show host's driver.
"This so-called treatment was just a thinly veiled threat to ruin Mr Letterman if he did not pay me a lot of money," Mr Halderman admitted to the court.
Mr Letterman's lawyer later gave Mr Halderman - who was reported to have had a considerable amount of personal debt - a false cheque.
The former producer for the CBS true crime programme 48 Hours Mystery is reported to have obtained the details he used to blackmail Mr Letterman from his ex-girlfriend's diary entries.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.