The company hired to design and build a broadband network in Western Massachusetts intentionally delayed paying its subcontractors in order to make its books look better, according to court documents.

The payment delays by G4S Technology are part of an ongoing contract dispute between G4S Technology and Massachusetts Technology Park Corporation -- the public agency that managed the work -- about who is responsible for a year-long delay in finishing the project. At stake is up to $14 million in public money, which G4S says is owed to them.

The payments were delayed for weeks or months and often made in bulk in the next fiscal quarter. A Suffolk Superior Court judge found that G4S knew it was violating its contract and made late payments repeatedly, over the course of more than a year, to improve its own financial picture.

In 2010, Massachusetts Technology Park Corporation, now called the Massachusetts Technology Collaborative, was given nearly $90 million, split between federal and state money, to build a 1,200-mile fiber-optic network to bring high-speed internet to Western and north central Massachusetts. The goal of the project, sometimes referred to as the "middle mile" project, was to connect more than 1,100 libraries, schools, government buildings, medical facilities and other community institutions to high-speed internet.

G4S signed a $45.5 million contract with the state on June 30, 2011 and was required to complete the project by June 30, 2013. Under the contract, the company would be assessed penalties for each day it missed various project deadlines, although those deadlines could be extended if the delays were not G4S's fault.

The project was not finished until Jan. 20, 2015.

The Massachusetts Technology Park Corporation withheld $4 million from G4S because of the missed deadlines. But G4S responded that the delays were the fault of Massachusetts Technology Park Corporation for not completing required preliminary work quickly enough. The company, in court, contested the withholding of $4 million and demanded an additional $10 million for costs that G4S incurred due to the delays.

In the course of that case, it was discovered that G4S had been delaying payments to subcontractors until after its fiscal quarters closed, so that it could show a more favorable cash flow, according to court documents. G4S is a publicly traded company.

Justice Scott Kafker wrote in a Supreme Judicial Court ruling that G4S received $38.6 million in payments based on 60 false certifications. Although the work had been performed, the company had not paid its subcontractors yet.

"At various times, subcontractors strongly objected and threatened to shut down work or remove crews from the project if G4S continued to withhold payments, even as G4S was getting paid by MTPC," Kafker wrote.

Internal emails cited in court documents show that company officials intentionally withheld payments. One G4S project manager wrote in an email, "How can we tell sub(contractors) that they aren't getting paid so our books look better? There's something wrong with that."

One subcontractor emailed the company, "The issue that bothers me the most is that you are not making payment (in order) to better your books but don't care about the books of the companies that support you."

A court brief filed by Massachusetts Technology Park Corporation cites emails from subcontractors saying they lost crews because of payment delays, and they would not send out any more crews until they were paid.

Because G4S's contract required the company to pay subcontractors on time, and G4S allegedly lied to Massachusetts Technology Park Corporation about making the payments, the issue has come up in the litigation over whether the contract was fulfilled and whether the company is owed additional money.

The Supreme Judicial Court on Wednesday sent the case back to Suffolk Superior Court after ruling that claims from both sides can proceed.