SACRAMENTO, Calif. -- A Republican state legislator who is an outspoken advocate for gun rights was cited Wednesday for trying to bring a loaded handgun onto a flight.

California Assemblyman Tim Donnelly was detained after a Colt .45 with four rounds was discovered inside his carry-on bag as he passed through a screening machine at Ontario International Airport, said Transportation Security Administration spokesman Nico Melendez.

Another magazine with five rounds was in Donnelly's carry-on bag at the airport 35 miles east of Los Angeles, Melendez said.

Donnelly, a self-proclaimed tea party Republican who lives in the Southern California mountain community of Twin Peaks, said he inadvertently left the gun in his briefcase.

He said he had it close by because of death threats he has received from a referendum drive he is spearheading to overturn a recent state law that allows illegal immigrant college students to apply for public financial aid. He told reporters at the state Capitol he placed it in the briefcase because he didn't want his wife to see that he had the firearm out.

"So I do tend to always be armed. The issue is strictly one that I completely forgot, coming back to work this morning, that it was in that briefcase," he said.

Donnelly did not respond when reporters asked if he had a concealed weapons permit.

Donnelly, 45, represents a largely working class district east of Los Angeles in a region referred to as the Inland Empire. Before he was elected to the state Assembly in 2010, Donnelly was best known as founder of the Minuteman Civil Defense Corps of California, a group that patrolled the U.S.-Mexico border in search of people attempting to enter the United States illegally.

Lawmakers who report death threats can obtain additional security, said Robin Swanson, a spokeswoman for Assembly Speaker John Perez, D-Los Angeles. Officials were checking to see whether Donnelly had reported such concerns, she said.

"If there are perceived threats against a member, Assembly sergeants or California Highway Patrol will accompany them to public events on an as-needed basis. A significant number (of assembly members) have needed this protection and used it," she said.

Melendez said TSA officials referred the incident to airport police, who cited Donnelly under state law for possession of an unloaded firearm and released him from custody.

Ontario Airport Police Sgt. Belinda Nettles said the officer who cited Donnelly made a mistake and that the citation will be corrected to reflect that the firearm was loaded. That crime is a misdemeanor with a possible penalty of up to a year in jail and $1,000 fine. Nettles said both the gun and extra magazine were seized.

The legislator said in a statement released by his office that he boarded the next Southwest Airlines flight without incident.

Federal prosecutors could also opt to pursue charges against Donnelly, Melendez said. Federal regulations allow passengers to carry guns in their checked luggage under certain conditions. About 1,200 people each year are cited for having a firearm in their carry-on luggage, according to the TSA.

"You can take a weapon on a trip with you as checked luggage, as long as it's unloaded and declared to the airline and in a sealed carrying case," Melendez said.

Donnelly last year opposed AB144, which made it illegal to carry an exposed and unloaded handgun in a public place in California as of Jan. 1.