A 19-year-old Maryland man has been indicted on charges that he threatened to kill two high-profile liberal senators – Bernie Sanders of Vermont and Kamala Harris of California – and to injure marchers at a gun control rally in Washington earlier this year.

The man, Nicholas Bukoski of Anne Arundel County, faces five felony counts: two for the alleged threats against Mr Sanders, an independent, and Ms Harris, a Democrat; and three that charge him with transmitting threats via interstate commerce.

In the indictment – which a federal grand jury returned on 11 April but was released only on Wednesday – specifics were sparse. But a memorandum filed by a federal prosecutor on Wednesday, which requested the court order the pretrial detention of Mr Bukoski, detailed the alleged threats.

Mr Bukoski, who faces robbery charges in an earlier unrelated episode, is suspected of sending Instagram messages to the offices of Mr Sanders and Ms Harris on 24 March, the day of the March for Our Lives rally, immediately before texting the Metropolitan Police Department tip line in Washington.

“Senator, I would watch your back as you’re out today,” read an Instagram message to Mr Sanders’ office.

“You wouldn’t want to be caught off guard when I use my second amendment protected firearm to rid the world of you, you stupid, crazy old fool.”

Two minutes later, according to the memorandum, an Instagram message was sent to Ms Harris’ office. It used a profane and sexist slur, then added, “I am going to make sure you and your radical lefty friends never get back in power you will never run for president, because you won’t make it to see that day.”

The third communication was a text message to the Police Department’s text tip line: “I am intending to send the message that gun control, bomb control, or any other kind of weapons control will not stop attacks, it is an issue of the heart.”

“My heart is messed up and evil, and part of me wants to see people suffer, goddammit,” it read. “Anyway, good luck and Godspeed finding my presents. This will be my only message.”

That text prompted the police to immediately determine who sent it, which led them that day to Mr Bukoski’s home, about 30 miles from Washington.

His father allowed police to enter, and the defendant, who appeared nervous, according to the memo, told the officers that he had studied “police tactics” and asked if the “bomb squad was coming.”

At that time, Mr Bukoski was handcuffed and taken to the Anne Arundel Medical Center for emergency evaluation. The memo said that while there, he admitted to sending the threats, among others, and stated that “he was frustrated with liberals and very supportive of the current president.”

Florida student Emma Gonzalez passionately calls for gun control at rally after school shooting

The defendant said he did not have access to a firearm because his “parents won’t purchase a firearm based on his history and the strict gun laws in Maryland,” and said that he “probably won’t be able to get one,” the memo said.

“I don’t want to kill people unless I absolutely need to,” the defendant reportedly said.

Mr Bukoski appeared in the US District Court for the District of Columbia on Wednesday and will remain in federal custody pending further proceedings, said Bill Miller, a spokesman for the US attorney’s office in Washington. Another court date had not been set, Mr Miller said on Wednesday.

A call and email to Mr Bukoski’s lawyer was not immediately returned on Wednesday. Attempts to reach his parents were unsuccessful.

Representatives for Mr Sanders and Ms Harris declined to comment on Wednesday.

On 24 March, Mr Bukoski’s father gave consent to the police to search the family’s home as well as the laptop and cellphone used by his son. He also gave the officers two journals written by his son.

Preliminary examination of the cellphone indicated that that day, the defendant had looked up how to contact Mr Sanders and the Police Department tip line, as well as a Wikipedia page titled “Threatening government officials of the United States.”

He had also visited websites about murders, serial killers and murders of police officers, the memo said.

On 9 April, Mr Bukoski was arrested on armed robbery charges in Anne Arundel County in connection with an 11 January knife-point robbery at a 7-Eleven convenience store. He is scheduled for a jury trial in that case on 6 September.