LITTLE ROCK, Ark. (AP) — An Arkansas attorney is suing local officials for denying him access to a courthouse while carrying a handgun, testing a state law meant to allow lawyers to possess firearms on court premises, according to the law’s authors.

Chris Corbitt, a patent attorney from Conway, filed the complaint last Thursday against Pulaski County officials after a security guard refused to let him enter the county’s district courthouse on Jan. 3 while he carried his concealed gun.

Corbitt, a concealed-carry licensee with an enhanced permit, said he usually leaves his weapon in his car, but that he forgot to before he walked into the courthouse earlier this month.

State law bans firearms from courthouses, except for bailiffs and other “officers of the court.” Corbitt argues that definition includes attorneys.

“This is the test case. I know of no other prior litigation on the issue,” said Corbitt’s lawyer, Robert Steinbuch.

The lawsuit, filed in Pulaski County Circuit Court, names Sheriff Eric Higgins and County Judge Barry Hyde as defendants. Both officials declined to comment to the Arkansas Democrat-Gazette.

Corbitt is using a 2017 law that was amended to decrease the penalty for illegally carrying a weapon into a courthouse. But the measure’s language referencing an “officer of the court,” dates back to 1997, according to legislative records.

Former state Rep. Sandra Rogers, a Democrat from El Dorado who co-authored the 1997 law, said last Friday that the law was initially written in response to concerns over courthouse shootings and was intended to apply to attorneys.

“That was written so that attorneys could carry guns into the courtroom,” Rogers said.

State Rep. Bob Ballinger, a Berryville Republican who authored the 2017 amendment, echoed Rogers.

“I don’t know how else you could interpret” the language, said Ballinger, who is a practicing attorney and hasn’t personally attempted to carry a gun inside a courthouse.

Steinbuch said he’s prepared to take the case to the Arkansas Supreme Court if he doesn’t succeed in lower courts.