Hartnett has been starring in the West End production of Rain Man
Hollywood actor Josh Hartnett has accepted libel damages of £20,000 over allegations of a "sexual dalliance" in a public area of a London hotel.
The Daily Mirror story alleged that the actor was captured on CCTV footage with a woman in the library of a Soho hotel.
His lawyer Graham Atkins told London's High Court the paper had accepted the allegations were "entirely false".
The 30-year-old, who has been starring in the West End production of Rain Man, will donate the money to charity.
Mr Justice Eady was told that the action had been brought after the publication of a story on 1 September with the headline "Josh Hartnett's saucy CCTV romp".
Mr Atkins said: "The article alleged that the claimant 'took a mystery lady' to the Soho Hotel in London and that 'their steamy shenanigans were caught on CCTV'."
He added: "It further alleged that 'dumbstruck' and 'cringing hotel workers saw all of Josh's X-rated moves' which resulted in the Soho Hotel asking the claimant 'to take his personal business elsewhere in the future'."
Mr Atkins said the article had caused "hurt, embarrassment and distress" to "a serious young actor who conducts himself in an appropriate and professional manner at all times".
Victoria Jolliffe, for the Mirror, said the paper hoped "the record will have been set straight and the claimant's reputation restored".
"The defendant offers its apologies to the claimant for any distress, hurt and embarrassment caused by the article," she said.
Hartnett, who has starred in films including Pearl Harbor and Black Hawk Down, has been appearing in Rain Man at London's Apollo Theatre since September.