The White House has called Star Wars actor Mark Hamill "one sick individual" after he posted ​an AI-generated image of US President Donald Trump in a ‌shallow grave, alongside the caption "if only".

The image, posted on Hamill's Bluesky account, showed Trump lying with his eyes shut, ​next to a headstone with the inscription "Donald J. Trump 1946-2024".

Hamill, who played Luke Skywalker in the original Star Wars films from 1977 onwards, later deleted the post and apologised. "Actually, I was wishing him the opposite of dead, but apologize if you found the image inappropriate," he wrote.

BBC News has asked the actor's representatives for a comment on the White House remarks about him.

In the now-deleted X post, Hamill - who has also voiced the Joker character in various DC Comics projects - wrote that Trump "should live long ​enough to witness his inevitable devastating loss in the midterms, be held accountable for his unprecedented corruption, impeached, convicted & humiliated for his countless crimes. Long enough to ​realize he'll be disgraced in the history books, forevermore."