A small Somerset County borough has agreed to pay $650,000 to settle a longstanding public-records lawsuit filed by a New Jersey newspaper chain nearly six years ago.

The sum to be paid by Raritan Borough to Gannett New Jersey may be the largest settlement in the history of the state's Open Public Records Act. The law allows individuals who win OPRA lawsuits against public agencies to recoup legal fees.

Raritan Borough said it would sell municipal assets and dip into its budget surplus in order to pay the settlement amount in 90 days, according to MyCentralJersey.com, which is owned by Gannett New Jersey.

The newspapers had sought employee salary and overtime information in a digital, non-PDF format. The borough initially claimed that officials did not have access to such a file and later tried to charge the newspapers $1,100 in order to have the borough's payroll company convert the file.

A Superior Court judge in 2012 ruled that the borough should have provided the newspapers with the digital file.

The borough filed an appeal, which was still pending until the settlement announced Wednesday.

The out-of-court settlement means that appellate judges now will not issue an opinion.

The settlement amount is less than what Gannett New Jersey had spent on its legal effort. The company owns the Asbury Park Press, Courier News, Courier-Post, Daily Record, Daily Journal and the Home News Tribune.

Full disclosure: The reporter for this story is a former employee of Gannett New Jersey.