NEW YORK (AP) — Two jail guards responsible for monitoring Jeffrey Epstein the night he killed himself were charged Tuesday with falsifying prison records to conceal they were sleeping and browsing the internet during the hours they were supposed to be keeping a close watch on prisoners.

Guards Tova Noel and Michael Thomas were accused in a grand jury indictment of neglecting their duties by failing to check on Epstein for nearly eight hours, and of fabricating log entries to show they had been making checks every 30 minutes, as required.

Prosecutors allege that instead of making required rounds, the guards sat at their desks just 15 feet from Epstein’s cell, shopped online for furniture and motorcycles, and walked around the unit’s common area. During one two-hour period, the indictment said, both appeared to have been asleep.

The charges against the officers are the first in connection with the wealthy financier’s death in August at the Metropolitan Correctional Center in New York, where he had been awaiting trial on sex trafficking charges.

The indictment also contained new details about the circumstances of Epstein’s death that might dampen conspiracy theories by people who have questioned whether he really took his own life.

Among them: Prosecutors said security camera footage confirmed that no one entered the area where Epstein was housed on the night he died.

U.S. Attorney Geoffrey S. Berman said the guards had “a duty to ensure the safety and security of federal inmates in their care.”

“Instead,” he said in a statement, “they repeatedly failed to conduct mandated checks on inmates, and lied on official forms to hide their dereliction.”

A lawyer for Thomas, Montell Figgins, said both guards are being “scapegoated.”

“We feel this is a rush to judgment by the U.S. attorney’s office,” he said. “They’re going after the low man on the totem pole here.”

Noel’s lawyer, Jason Foy, said he hoped to “reach a reasonable agreement” with the government that could avoid a trial.

Both correctional officers pleaded not guilty Tuesday afternoon and were released on $100,000 bond. The defendants, hiding their faces with clothing, left the courthouse in separate cars waiting for them in the shadow of the jail where they had worked and Epstein died.

Epstein’s death was a major embarrassment for the U.S. Bureau of Prisons.

The cell where he died was in a high-security unit, famous for having held terrorists and drug cartel kingpins. Epstein’s death, though, revealed the jail was suffering from problems including chronic staffing shortages that lead to mandatory overtime for guards day after day and other staff being pressed into service as correctional officers.

Attorney General William Barr had previously said investigators found “serious irregularities” at the jail and the FBI’s investigation had been slowed because some witnesses were uncooperative.

Epstein had been placed on suicide watch after he was found July 23 on the floor of his cell with a strip of bedsheet around his neck, according to the indictment.

After 24 hours, he was transferred to the facility’s hospital wing for a psychological observation, where he remained under close watch.

Epstein was moved back to a regular cell on July 30 where he was required to have a cellmate, but he was left with none after his cellmate was transferred out of the MCC on Aug. 9, the day before his death, the indictment said.

The indictment said that Epstein was found unresponsive in his cell when the guards went to deliver breakfast. Noel confessed to a supervisor then that they hadn’t done either their 3 a.m. or 5 a.m. rounds, the indictment.

According to the indictment, Thomas said: “We messed up.” And then added, “I messed up, she’s not to blame, we didn’t do any rounds.”

Prosecutors had wanted the guards to admit they falsified the prison records as part of a plea offer that they rejected, according to people familiar with the matter. They spoke on the condition of anonymity because they were not permitted to publicly discuss the investigation.

Marc Fernich, a lawyer for Epstein, said: “It would be a shame if minor scapegoats — classic low-hanging fruit, the softest targets — were made to take the fall for this tragedy on what amounts to a coverup theory. Unless it prompts genuine self-reflection from all major participants and stakeholders in our criminal justice system and those who cover it, Mr. Epstein’s death in federal custody — senseless and sad as it is — will have been entirely for naught.”

The city’s medical examiner ruled Epstein’s death a suicide.

Dr. Michael Baden, the forensic pathologist hired by Epstein’s family to observe his autopsy, recently suggested some of Epstein’s injuries were more consistent with homicide rather than suicide, though other experts disputed that.

Baden said Tuesday the arrested officers could have information that’s “going to be critical in determining whether it’s homicide or suicide.”

Kathleen Hawk Sawyer, the new director of the Federal Bureau of Prisons, told the Senate Judiciary Committee on Tuesday there is “no evidence to suggest” anything other than suicide.

Falsification of records has been a problem throughout the federal prison system.

Sawyer, who was named director of the Bureau of Prisons after Epstein’s death, disclosed in an internal memo earlier this month that a review of operations across the agency found some staff members failed to perform required rounds and inmate counts but logged that they had done so anyway. A copy of the memo was obtained by the AP.

Epstein’s death ended the possibility of a trial that would have involved prominent figures and sparked widespread anger that he wouldn’t have to answer for the allegations.

He had pleaded not guilty and was preparing to argue that he could not be charged because of a 2008 deal he made to avoid federal prosecution on similar allegations.