The man accused of breaking into Eminem’s Michigan home said he was there to “kill” the rapper, a court has been told.

Matthew David Hughes, 27, allegedly had a confrontation with Eminem in the living room of the artist’s home in April, according to the Detroit Free Press.

A police officer told Macomb County District Court that Eminem woke up to find a man standing behind him. The rapper initially thought the man was his nephew before realising it was a stranger.

“When Mr Mathers asked him why he was there, he was told by Mr. Hughes that he was there to kill him,” the police officer testified.

A red brick was found inside a broken window on the home’s west side, the officer said. A detective also testified that multiple angles of security footage showed Hughes on the premises for “quite some time” before he climbed through the window.

Hughes faces charges for first-degree home invasion and malicious destruction of property.

Eminem was not present in court, but his attorney watched the proceedings via video link.