A judge in Maryland ruled Monday that according to health department report, the man accused of killing five people at a newspaper office in 2018 is legally sane.

NBC affiliate WBAL-TV of Baltimore reported that the judge said the Maryland Department of Mental Health's report indicates that 39-year-old Jarrod Ramos is criminally responsible.

Ramos has pleaded not guilty and not criminally responsible — which is the state's version of an insanity defense — in the June 28, 2018, shooting at the Capital Gazette newspaper’s office in Annapolis that killed five people.

"The report from the Maryland Department of Mental Health indicates the defendant is criminally responsible," Judge Laura Ripkin said at Monday’s pretrial hearing, according to WBAL-TV.

The trial is scheduled to begin Nov. 4. Ramos is charged with 23 counts, including five counts of first-degree murder.

The trial has been split into two phases at Ramos' request: If he is found guilty in the deadly attack, a second phase will determine whether he is criminally responsible, the Capital Gazette reported.