Universal Health Services Inc., a King of Prussia hospital operator, said Thursday that it had agreed to pay $127 million settle a long-running civil False Claims Act investigation of billing practices at about 30 of its psychiatric facilities.

UHS also said criminal investigations of the company, underway at least since 2015, had been closed. No charges were filed, the company said.

The civil agreement in principle with the U.S. Department of Justice and numerous state attorneys general offices won’t be final until a definitive agreement is reached and approved by authorities.

The company had denied wrongdoing.

UHS, which had net income of $238 million on revenue of $2.9 billion in the three months ended June 30, owns 26 acute-care hospitals and 288 behavioral-health facilities.