Ronald Ellis, accused in the gunshot slaying of his wife, two daughters and three acquaintances at his Camp Springs home last month, has pleaded innocent by reason of insanity.

Ellis, a 34-year-old printer who allegedly fled to Chicago after the shootings and surrendered to authorities eight days later, is being held in the County Detention Center in Upper Marlboro. He is expected to be transferred to the Clifton T. Perkins Center in Jessup, Md., for psychiatric examination, according to his attorneys, who entered the plea for him.

If convicted on multiple murder charges, Ellis could be sentenced to die in Maryland's gas chamber.

Reginald Holt, a partner in the firm representing Ellis, said the insanity plea means the trial will probably "boil down to a battle of experts," with the outcome determined by the testimony of psychiatric experts on both sides.

Prince George's County State's Attorney Arthur A. Marshall Jr. said he personally will prosecute Ellis. Motions will be heard on July 16, and the trial has tentatively been set for Aug. 25.

Ellis's defense team is led by prominent Washington lawyer R. Kenneth Mundy. It will be the third major murder trial in which he and Marshall, the chief Prince George's prosecutor, have opposed each other.

In the most celebrated of those trials, Terrence Johnson, a 16-year-old Prince George's youth, was acquitted on charges of murdering two county police officers in 1979, but was found guilty on two lesser charges and sentenced to 25 years in prison. The case, Holt pointed out, also turned on a psychiatric defense.

The shootings of which Ellis is accused occurred on the afternoon of May 2. His wife, Ingrid, was found lying near the door of the Ellis's quiet suburban home, shot five times with a hand gun.

Two of Ellis's three daughters, Tammy, 12, and Monica, 4, along with two of Ingrid Ellis's friends, Sherry Robinson of Upper Marlboro and Janet Jackson of Boulevard Heights, and Jackson's 12-year-old son, Tyrone, were found in a back bedroom killed by multiple shotgun blasts, police said.