A senior EPA official who masqueraded as a CIA spy so he could skip work will be sentenced Wednesday for defrauding the U.S. government out of nearly $1 million.

John C. Beale, 64, was one of the EPA's top climate experts when he collected hundreds of thousands of dollars in undeserved bonus and travel expenses while disappearing for up to 18 months at a time.

When his superiors asked of his whereabouts, he answered Pakistan or "Langley," implying he was reporting to the headquarters of the intelligence agency. According to an NBC News report, Beale once claimed to be urgently needed in Pakistan because the Taliban was torturing his replacement. Federal prosecutors described his fraud as a "crime of massive proportion."

According to NBC's Michael Isikoff, Beale wrote EPA administrator Gina McCarthy:

"Due to recent events that you have probably read about, I am in Pakistan," he wrote McCarthy in a Dec. 18, 2010 email. "Got the call Thurs and left Fri. Hope to be back for Christmas ….Ho, ho, ho."

In fact, Beale had no relationship with the CIA at all. (Patrick) Sullivan, the EPA investigator, said he confirmed Beale didn't even have a security clearance. He spent much of the time he was purportedly working for the CIA at his Northern Virginia home riding bikes, doing housework and reading books, or at a vacation house on Cape Cod.

"He's never been to Langley (the CIA's Virginia headquarters)," said Sullivan. "The CIA has no record of him ever walking through the door."

Beale might have gotten away with it. But he kept drawing his salary for a year after holding an extravagant retirement party in 2010 aboard a yacht. The EPA credited McCarthy - who had attended the party -  with discovering the fraud.

Beale, who earned $206,000 a year in salary and benefits, pleaded guilty in September and has agreed to pay nearly $1.3 million in restitution.