A former high-ranking official with the Environmental Protection Agency pleaded guilty Friday to stealing nearly $900,000 from the agency over 13 years by failing to show up for work while falsely claiming to be working for the CIA and for filing bogus expenses.

John C. Beale, 64, a former deputy assistant administrator in the Office of Air and Radiation, accepted a plea agreement with the government at a court hearing. U.S. Magistrate Judge John M. Facciola read the evidence against Beale and asked if it were true.

In a flat, emotionless voice, Beale answered, “Yes it is, your honor.”

Under the plea deal with prosecutors, Beale faces 30 to 37 months in prison. The deal also calls for Beale to pay restitution of $886,000, forfeit an additional $507,000 and pay a fine of up to $60,000. The final decision will be made by the sentencing judge in the case, Ellen Segal Huvelle. No sentencing date has been set.

Beale, wearing glasses and a gray suit without a tie, managed a slight, grim smile after the proceedings. He was released on personal recognizance and will return to Manhattan, where he now lives.

“John Beale stole from the government for more than a decade by telling lies of outlandish proportions,” Ronald Machen, the U.S. attorney for the District of Columbia, said in a statement.

The agency’s inspector general, Arthur A. Elkins Jr., said that Beale was able to get away with the fraud for so long because of “an absence of even basic internal controls at the EPA.”

The EPA did not immediately respond to a request for comment.

According to the statement of offense that he signed, Beale started taking one day a week off from work starting in 2000, and indicated on his EPA electronic calendar he was working at the CIA’s Directorate of Operations. He told an EPA manager that he had been assigned to an interagency, special advisory group, and the manager agreed to his request. For 102 days from 2000 to June 2008, Beale took off while claiming to work for the CIA, the court document says.

In 2005, an EPA manager approved a research project that Beale had proposed, despite the fact that it had no internal controls or oversight. From 2005 to 2007, Beale took about five trips to Los Angeles for the project and was reimbursed for $57,000. The statement of offense says that he used the project to have the EPA pay for his personal travel, which included visiting family members in California.

Beginning in June 2008, Beale was a no-show at work for about six months, telling managers and employees he was working on the research project or working for “Langley,” where the CIA is based. Then he took off from June 2011 to December 2012 for his claimed CIA work, even after he announced he was retiring from the EPA. In total, he took about 2 ½ years off from work.

The $886,000 that Beale agreed to pay back to the government includes the time he took off from work, as well as the travel reimbursement, a retention bonus that was supposed to expire after 2003 but went on through 2013, and a parking space near an EPA building, used for several years and valued at $8,000. Beale got the space by claiming he needed it for medical reasons, saying he had contracted malaria while serving in Vietnam. In fact, he never served in Vietnam and never contracted malaria, according to the statement of offense.

Beale is schedule to testify Tuesday at a House Oversight and Government Reform Committee hearing titled, “Secret Agent Man? Oversight of EPA’s IG Investigation of John Beale.” Elkins, the EPA inspector general, and other current and former EPA officials are also expected to testify, according to the committee.