The Twin Peaks Republican was placed on probation for three years and fined $2,215, said Christopher Lee, spokesman for the San Bernardino County District Attorney's Office.
Donnelly faced charges of illegal possession of a loaded firearm and possession of a prohibited item in a sterile area in connection with the Jan. 4 airport incident involving a loaded .45-caliber firearm.
The two misdemeanors carried maximum jail sentences of one year and six months, respectively. Offenders also could be fined up to $1,000 for each count. Judges are free to impose lighter sentences, however, based on circumstances.
Donnelly was ordered to pay his $2,215 fine in increments of $200 per month, starting May 1, Lee said.
The assemblyman's gun and ammunition will be destroyed by law enforcement, and Donnelly was ordered not to use, possess or own a firearm not registered to him, Lee said.
Rod Pacheco, Donnelly's attorney, characterized the plea agreement as a fair resolution of a case in which the assemblyman immediately and consistently accepted responsibility
"This has been an incredible distraction for him," Pacheco said.
"He wasn't trying to sneak it in," Pacheco said of the gun. "He put the bag in the scanner, for god sakes. He obviously wasn't trying to sneak something through the scanner. You can't get a metal toothpick through the scanner, let alone a handgun."
Donnelly called the incident a regrettable but "innocent and honest mistake."
"My family and look forward to putting this behind us," he said in a written statement. "Many have sent words of encouragement throughout this time, and we are truly grateful. I am excited to move forward to continue representing the people and values of our district."
Federal Transportation Security Administration officials described Donnelly's gun as a .45-caliber Colt Mark IV. It had four rounds in its magazine and a spare magazine with five rounds, TSA officials said.
Donnelly, 45, said on the day of the incident that he tended to arm himself because of death threats received after launching a referendum campaign - ultimately unsuccessful - to overturn the Dream Act, a new law permitting undocumented immigrants to qualify for state-funded college aid.
The first-term legislator placed the firearm in a nearby bag when his wife arrived home while he was working in his garage several days before the flight, said Donnelly, a businessman and founder of a chapter of the Minuteman Project, a citizens group that monitors the border to combat illegal immigration.
Donnelly said he later forgot to retrieve the weapon, even after entering Ontario airport for a flight to the Capitol, where the Assembly was reconvening for its first floor session of the new legislative year.
Donnelly said he was standing in stocking feet, waiting for his bag to clear inspection, when a friendly airport screener's facial expression suddenly changed and a supervisor was called.
The assemblyman was cited and released at the scene. San Bernardino prosecutors formally filed the two misdemeanor charges more than seven weeks later.
Pacheco said he is certain the lawmaker will never make the mistake of carrying a gun to an airport again.
Oh my gosh, I think the assemblyman has very well learned the value of checking his bag," Pacheco said. "And maybe so have a lot of other people."
* Updated at 11:30 a.m. to add response by Donnelly's attorney, Rod Pacheco. Updated at 3 p.m. to add Donnelly's statement.