The man accused of fatally shooting Charlie Kirk confessed to killing the right-wing activist in a message to his roommate, prosecutors have alleged, as they announced seven charges against him.

Tyler Robinson, 22, left a note under a keyboard for his roommate to discover, said Utah County Attorney Jeffrey Gray. He added that the roommate was Mr. Robinson's romantic partner.

According to Mr. Gray, the note said: 'I had the opportunity to take out Charlie Kirk, and I'm going to take it.'

The prosecutor also shared text messages between the roommates, including one in which the defendant allegedly said he shot Kirk because he had 'had enough of his hatred.'

The suspect is being held without bail in a special housing unit at the Utah County Jail. He made his first court appearance on Tuesday, appearing remotely as prosecutors read the seven charges against him.

The charges are aggravated murder, felony discharge of a firearm, two counts of obstruction of justice, two counts of witness tampering, and committing a violent crime when children are present.

They also said they would seek the death penalty over the shooting of Kirk, who was killed by a single gunshot fired from a rooftop as he was speaking at Utah Valley University on Wednesday.

Arrested last week after a 33-hour manhunt, Mr. Robinson has not entered a plea or confessed to police. Mr. Gray also stressed that the suspect is innocent until proven guilty and will face trial by jury.

He unveiled a trove of evidence at a news conference on Tuesday, including the defendant's alleged confession and DNA found on the trigger of the rifle suspected to have been used in the crime.

Describing the alleged hidden note at a news conference earlier on Tuesday, Mr. Gray said Mr. Robinson had sent a text message to his roommate reading: 'Drop what you're doing, look under my keyboard.'

After reading the apparent confession, the roommate, who has not been named and is co-operating with investigators, replied: 'What?????????????? You're joking, right????'

Mr. Gray also gave more detail about how Mr. Robinson's parents became suspicious that their son may have been involved in Charlie Kirk's killing.

He said Mr. Robinson's mother had seen a video of the suspect released a day after the shooting and told her husband it looked like their son. She confronted Mr. Robinson over the phone about the resemblance, but he told her he had been home sick on the day of the shooting.

Ultimately, Mr. Robinson expressed feelings of hopelessness and indicated concerns about going to jail. He was persuaded by his family to surrender.

The prosecution holds that Kirk was specifically targeted for his views, as indicated by Mr. Robinson's statements about having 'had enough of his hatred.'

Mr. Gray concluded that while the evidence is compelling, it will ultimately be up to a jury to decide Mr. Robinson's guilt or innocence.