SACRAMENTO -- Assemblyman Tim Donnelly, a Republican candidate for governor, will not face legal action for shooting borrowed guns while on probation, the San Bernardino County district attorney said Friday.

The Inland Empire lawmaker is not allowed to "use, own or possess any firearm that is not registered to him" for three years after bringing a loaded handgun to Ontario International Airport in 2012, according to court records.

However, Dist. Atty. Michael Ramos said "no further action will be taken" against Donnelly, who used three borrowed firearms to practice his shooting during a campaign event in Santa Cruz County this month.

“The term of probation was never intended to apply to shooting at a gun range," Ramos said in a statement. "This matter is closed, and no further comment will be made. I will not allow our office to be used for political purposes.”

A spokesman for Ramos, Christopher Lee, declined to specify why Donnelly's probation does not apply to gun ranges.

Donnelly, an outspoken gun-rights advocate, has defended his actions, saying questions about his probation are "much ado about nothing."

"I didn’t do anything other than exercise my 2nd Amendment rights as a free American," he said in an interview with The Times last week.

He told radio hosts John and Ken that "it's considered rude if you don't fire someone's gun when it's offered to you."

Donnelly spokesman Jennifer Kerns said the candidate does not plan to visit any other gun ranges for the time being.