Mozaffar Khazaee, an Iranian-American who also worked for General Electric and Rolls Royce, entered his plea as part of a settlement with U.S. attorneys.

U.S. District Judge Vanessa L. Bryant accepted the settlement after outlining the rights Khazaee would waive and hearing his explanation of the crime, which carries a maximum sentence of 20 years in prison and $1 million in fines.

Federal law enforcement agents arrested Khazaee, 60, in late 2013 at the Newark Liberty International Airport in New Jersey as he attempted to fly to Iran, through Germany. He was found with $59,945 in cash, which he will forfeit.

The arrest followed the discovery of thousands of pages of sensitive information in boxes that Khazaee tried to ship from his old apartment in Connecticut to his family in Iran. The files included printed-out presentations, schematics and other documents, some related to the U.S. Air Force's F-35 Joint Strike Fighter program and the F-22 Raptor program.

"While employed with U.S. defense contractors, Mozaffar Khazaee stole sensitive, proprietary and controlled technology to send it to Iran," U.S. Attorney Deirdre M. Daly said in a statement. "The illegal export of our military technology compromises U.S. national security and reduces the advantages our armed forces currently possess."

In pleading guilty to one count of violating the Arms Export Control Act, Khazaee explained that he kept proprietary and export-controlled materials from his former employment at General Electric, Rolls Royce and Pratt, which laid him off in August 2013. He said that he shared the materials with interviewers as he applied for a job at an Iranian university.

Khazaee said he planned to send about 40 boxes to Iran for storage while he looked for work in the United States, then have the boxes sent back when he was again employed. All together, he said, the shipping costs would have totaled about $2,700. The shipment from Connecticut to California was inspected and found to contain the sensitive information.

"I made a very bad mistake," Khazaee said, beginning his allocution to the court. "It was a mistake that I kept some of the documents that upon termination I should have returned."

Federal documents show that In late 2009, after Khazaee had been laid off from Rolls Royce in Indianapolis, he corresponded with someone in Iran, whom Khazaee gave access to documents related to the F-35 Joint Strike Fighter program to vouch for his engineering credentials.

In one email sending files to an individual in Iran, according to prosecutors, Khazaee acknowledged the risks sharing the information, saying "some of these are very controlled . . . and I am taking [a] big risk. Again please after downloading these two Power Point files delete everything immediately."

U.S. Attorney Stephen B. Reynolds said Wednesday that sentencing guidelines point to about 5 years in jail. The settlement approved by the court carries consideration for Khazaee's plea, but it is unclear how that might affect sentencing, scheduled for May 20.

An earlier version of this story mischaracterized the plea settlement and has been updated.