A Capital Gazette newspaper rack displays the day’s front page on June 29, 2018, in Annapolis after a gunman killed five people in the newsroom. (Patrick Semansky/AP)

The trial of the man charged in the Capital Gazette shooting can be split into two proceedings, with one phase to determine his guilt or innocence and another to determine whether he should be held criminally responsible if there is a conviction, a judge ruled Tuesday.

Anne Arundel County Circuit Court Judge Laura S. Ripken agreed to break up the proceedings at the request of defense attorneys for Jarrod Ramos, 39.

Ramos has pleaded not criminally responsible to all charges in the case — Maryland’s version of an insanity defense — citing a “mental disorder” that prevented him from conforming to the law in the newspaper shooting that left five dead.

Ramos appeared briefly in court Tuesday for a pretrial hearing before what was to have been an all-day event, which was postponed because one of his public defenders had a death in the family and could not be present.

Lawyers had been prepared Tuesday to fight over a number of motions, including whether prosecutors should have access to Ramos’s tax records as they seek to beat back defense assertions that Ramos should not be held criminally responsible.

Ripken granted the request to split Ramos’s trial before postponing the hearing to July 17. Ripken also granted a request Tuesday from the state department of health, which asked for more time to complete its mental evaluation of Ramos because the department is awaiting additional records. The deadline was pushed back to Aug. 10.

Jarrod Warren Ramos is accused of killing five people at the Capital Gazette newsroom in Maryland. (AP)

Tuesday’s hearing was slated days before the first anniversary of the shooting, in which prosecutors allege Ramos blasted through the doors of the Annapolis-area newsroom with a shotgun and went on a rampage because of a long-standing grudge against the publication.

Police say Ramos planned the attack and was armed with smoke grenades and a 12-gauge pump-action shotgun. Ramos is accused of killing five people: editorial page editor Gerald Fisch­man, 61; assistant editor Rob Hiaasen, 59; sportswriter, reporter and editor John McNamara, 56; sales assistant Rebecca Smith, 34; and reporter Wendi Winters, 65.

Ramos acted out of a grudge against the paper after a columnist published a piece about Ramos’s pleading guilty to harassing a former high school classmate through social media, police and prosecutors said.

Years before the shooting, Ramos filed a defamation lawsuit against the paper, which he lost, and sent the publication threatening messages via social media and letters.

Last year, Ramos planned the assault on the Capital Gazette, prosecutors say, barricading doors to prevent people from escaping after shooting out the glass doors to the office. Police quickly stormed the newsroom and found that Ramos had laid down his shotgun and hidden under a desk.

The hearing in July will focus on a number of discovery issues, including what access prosecutors should have to Ramos’s financial history.

Prosecutors have asked for tax records dating to 2003. The state argues that the documents “will clearly demonstrate the Defendant’s mental state in the years leading up to the events of June 28, 2018, and that he was, is, and remains an individual capable of appreciating the criminality of his conduct and to conform his conduct to the requirements of the law.”

Ramos’s attorneys have pushed back, saying the tax records are personal and confidential.

The state’s reliance on tax records to try to prove that Ramos was able to adhere to the law is based on a “bald assertion,” defense attorneys wrote.

The defense is also trying to block the state’s requests for education and jail records, and is fighting prosecutors’ attempts to hire their own psychiatrist to conduct a mental-health evaluation of Ramos.