TRENTON -- The state Attorney General's Office has paid a New Jersey gun rights group $101,626 in legal costs and released documents describing the state's firearms background check process after fighting their disclosure in court for years, NJ Advance Media has learned.

The payment was ordered by a judge after a lengthy legal battle between the state and the New Jersey Second Amendment Society, which was seeking the State Police's guide for local departments performing checks on those applying for gun permits.

It comes after a commission formed by Gov. Chris Christie issued a December report finding New Jersey's permitting process was opaque and inefficient.

Society President Alexander Roubian called the decision "a partial victory." He said the group had filed an appeal because the document they received was heavily redacted.

Spokesmen for the State Police and the Attorney General's Office declined to comment on the case.

The group first filed their lawsuit in 2011 after the State Police denied a records request seeking their September 2000 guidebook for police departments vetting applications for firearms identification cards, handgun purchase permits and concealed carry licenses.

Second Amendment advocates have said the state's law that spells out the application process has been applied inconsistently from town to town, with firearms permit applications taking anywhere from a few weeks to more than a year to be approved or rejected. Roubian said his group was trying to collect information on the process to advise its members on how to comply with the law.

The division denied the request, citing exemptions in the state's Open Public Records Act for documents that reveal investigative techniques and training procedures.

"It's absurd, because what are they really gaining by preventing us from knowing how they're investigating us?" Roubian said.

A trial court sided with the State Police, but an appeals court later reversed the decision, court records show.

Eventually, the division released a redacted copy of the 110-page "Firearms Applicant Investigation Guide" but withheld other documents related to the permit process, invoking attorney-client privilege, according to Richard Gutman, the Second Amendment Society's attorney.

In December, Judge Douglas Hurd ordered the state to partially compensate the group for court costs and attorney fees. The payment was disclosed this week in documents requested by NJ Advance Media under the Open Public Records Act.

The group has filed an appeal seeking all of the requested material, saying that the division withheld documents clearly within the public domain.

"They claim the parts that were redacted were highly sensitive information, yet some of the information they redacted is on their website," Roubian said.

A copy of the document obtained by NJ Advance Media includes entire pages blacked out, particularly in sections describing investigation procedures.

The governor's panel, the New Jersey Firearm Purchase and Permitting Study Commission, recommended reforms to the state's permitting process, including additional transparency and the publication of data on permit wait times by town.

The body also recommended the attorney general issue a directive explicitly spelling out the permitting process.

Paul Loriquet, a spokesman for acting Attorney General Robert Lougy, said Tuesday those recommendations were "still under review."

S.P. Sullivan may be reached at ssullivan@njadvancemedia.com. Follow him on Twitter. Find NJ.com on Facebook.