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 cooperating with investigators, replied: What?????????????? You're joking, right????

Mr. Gray cited further lengthy text message exchanges between Mr. Robinson and his roommate, whom he described as his romantic partner. Authorities have said the roommate is transgender and transitioning from male to female.

In one exchange, the roommate asked Mr. Robinson why he had killed Kirk.

'I had enough of his hatred,' Mr. Gray cited the messages as saying. 'Some hate can't be negotiated out.'

Mr. Robinson also allegedly wrote: To be honest I had hoped to keep this secret till I died of old age. I am sorry to involve you.

Mr. Robinson's parents became suspicious that their son may have been involved in Charlie Kirk's killing. They confronted him over the phone after seeing a video of the suspect released a day after the shooting.

With the help of a family friend, a retired deputy sheriff, his parents convinced him to surrender to the police and he was arrested late on Thursday - 33 hours after the shooting.

The prosecutor declined to answer when asked if Kirk had been targeted for his transgender views. That is for a jury to decide, he said.

Mr. Gray said the suspect's DNA had been found on the trigger of the rifle used in the shooting. He also said Mr. Robinson's father had suspected the weapon matched a bolt-action rifle that had once belonged to the suspect's grandfather.

Mr. Robinson is also charged with witness tampering, prosecutors said, because he directed his partner to delete their messages and stay silent if questioned.