REDWOOD CITY, Calif. (AP) — A farmworker charged with killing seven people last month in back-to-back shootings at two Northern California mushroom farms pleaded not guilty Thursday.

Chunli Zhao, 66, is charged with seven counts of murder and one count of attempted murder.

Prosecutors said that on Jan. 23 he opened fire at the Half Moon Bay mushroom farm where he worked, killing four co-workers and wounding another one. They said he then drove to a mushroom farm he was fired from in 2015 and shot to death three former co-workers.

Zhao admitted to the shootings during a jailhouse media interview days after the shooting. Zhao told local media he was bullied and worked long hours on the farms and that his complaints were ignored.

Dressed in a red jail uniform on Thursday, Zhao appeared behind a glass partition in the courtroom with his head bowed and spoke only when a Mandarin translator relayed questions from the judge, the Mercury News reported. At a hearing last week, Zhao sobbed so loudly that the judge called for a brief recess.

The judge last week issued a gag order prohibiting prosecuting and defense attorneys, as well as Zhao and the county sheriff’s office, from talking to reporters about the facts of the case or sharing opinions about what happened. They can still discuss rulings that were made in open court and the procedural status of upcoming hearings.

Earlier, the judge granted a request from defense attorneys to restrict remote access to court records.