TRENTON -- For most public agencies, employee pay stubs and overtime data are matters of public record, kept on file to hand over immediately to anyone who asks for them.

At the New Jersey State Police, those same records are a state secret.

But a Superior Court judge on Monday ordered the division to release pay stubs and overtime information to an open records advocate who sued for them.

The order followed a hearing last week at which the judge also slammed the statewide force for its "abysmal record" of taking months to provide documents considered public under state law.

Officials at the State Police have long maintained that disclosing how much their troopers make in overtime would pose a security threat because top overtime earners often work in sensitive areas like homeland security or the governor's protection detail.

Maj. Scott Ebner, the division's chief of staff, wrote in a recent court filing that "terrorists and other wrong-doers" could use that information to determine troopers' duty assignments, placing the public -- and the troopers themselves -- in harm's way.

"In an age when the internet can be used to assemble scattered personal information and provide details about residence, family and activities, troopers and members of their families could be placed at risk for physical harm, including kidnapping and other threats designed to intimidate or frustrate the trooper's ability to perform his job," he wrote in a September filing.

State Police cited 18 specialized units whose assignments were "particularly important to shield from disclosure," including the K9, marine and aviation units.

John Paff, an open records advocate and member of Libertarians for Transparent Government who regularly files records requests and posts the results on his blog, wasn't buying the argument that such assignments were a closely guarded secret.

He requested pay stubs and overtime records for four specific troopers and, when he was denied, filed suit.

His attorney, CJ Griffin, told NJ Advance Media she was able to find the duty assignments of multiple troopers who work in such sensitive areas, including two specifically named in Paff's request, without engaging in any espionage.

"I just went on their social media," Griffin said.

There, on the State Police Facebook page, was a trooper with the aviation unit showing off his helicopter to local school kids. Over on Twitter, another trooper posed for a picture with his canine partner. On Instagram, a trooper from the marine unit racked up likes with a picture of a small boy aboard his patrol boat, trying on his hat.

Lawyers for the Attorney General's Office, which represented the State Police in the suit, relied on a 2005 decision in a lawsuit brought by The Star-Ledger newspaper. In that case, a judge agreed with the State Police's position that releasing overtime records posed a security threat.

But Judge Mary Jacobson found otherwise. In her oral decision on Thursday, Jacobson said the State Police's habit of posting photos of troopers on social media "undercuts the credibility" of Ebner's claim that releasing overtime information put them in harm's way.

Jacobson ordered that the records be released by Nov. 27.

A spokesman for the State Police referred questions to the Attorney General's Office. A spokeswoman for Attorney General Christopher Porrino said the office would file an appeal.

Jacobson also ordered the State Police's records custodians to explain why the division has shown a "pattern and practice" of taking weeks or months to respond to routine records requests.

In the lawsuit, Paff and his attorney provided documents showing the division regularly failed to meet deadlines under New Jersey's Open Public Records Act, known as OPRA.

State attorneys, given the opportunity to explain the delays, had nothing to say, Jacobson said.

"We're dealing with more than 100 days (of delays) -- and sometimes more than 140 days -- without any particular explanation," the judge said. "It's really an abysmal record, and you have a law enforcement group that seems to be turning its back on one of the laws that apply to it as a public entity."

Paff, a prolific records requestor who says he often files requests to test and expand the boundaries of public access, told NJ Advance Media that taxpayers have a strong interest in maintaining access to police overtime records.

"It is, after all, their money," he said.

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