A man accused of gunning down five employees at a Maryland newspaper office last year admitted to the crimes in court on Monday, according to reports.

Although his attorney said he is maintaining his plea of not criminally responsible by reason of insanity, Jarrod Ramos stood in court and repeatedly answered, "That is correct," when asked by Judge Laura Ripken whether he understood he was giving up his right to the first phase of his trial to determine whether he committed the crimes. "Yes, I am," Ramos said, according to The Associated Press, when he was asked if he was guilty of all 23 courts in an indictment, including first-degree murder.

Ramos was charged with five counts of murder for entering the Capital Gazette in Annapolis with a pump-action shotgun and opening fire on June 28, 2018.

Killed in the shooting were Gerald Fischman, Rob Hiaasen, John McNamara, Rebecca Smith and Wendi Winters. Six other people were wounded.

It was one of the deadliest attacks on journalists in U.S. history.

Jarrod Ramos is charged with five counts of murder for entering the Capital Gazette in Annapolis with a pump-action shotgun and opening fire on June 28, 2018. (Anne Arundel Police via AP, File)

Attorney Katy O'Donnell said her client is still seeking a jury trial to determine if he might be declared not criminally responsible by reason of insanity.

Ramos pleaded originally not guilty and not criminally responsible. The latter term is Maryland's version of an insanity defense.

CLICK HERE TO GET THE FOX NEWS APP

Ramos, 39, had a long history of harassing the Capital Gazette staff in connection with a defamation suit he filed against the newspaper in 2012. The suit was thrown out.

Police said Ramos was angered that the newspaper reported on his guilty plea to a misdemeanor harassment charge about a decade ago after a former high school classmate alleged he was stalking and harassing her.

The Associated Press contributed to this report.