Universal Health Services Inc., a King of Prussia hospital operator, has reached a final agreement on its $127 million settlement of a long-running civil False Claims Act investigation of billing practices at about 30 of its psychiatric facilities, federal authorities and UHS said Friday.

Starting in 2015 or earlier, the company was also under criminal investigation, but those probes were closed a year ago when the company announced a civil agreement in principle with the U.S. Department of Justice and numerous state attorneys general offices. The amount of money at stake hasn’t changed since then.

“The government alleged that between January 2006 and December 2018, UHS facilities admitted as patients federal health-care beneficiaries who were not eligible for inpatient or residential treatment because their conditions did not require that level of care, while also failing to properly discharge appropriately admitted beneficiaries when they no longer required inpatient care,” according to a news release from U.S. Attorney William M. McSwain.

The government’s investigation involved 19 whistle-blower lawsuits, some involving multiple plaintiffs. The resolution calls for 36 whistle-blowers to split $15.9 million from the federal government’s $88.1 million share of the settlement. States will receive an additional $28.9 million. The government withheld $9.7 million in payments, bringing the total settlement to $127 million.

UHS denied wrongdoing. “UHS unequivocally disputes any allegation that it engaged in wrongdoing of any kind and the agreement is not an admission of liability but merely a resolution of a civil claim,” the company said in a statement Friday.

The company’s shares closed Friday at $89.76, up $1.15, or 1.3%, but the stock is well off its 2020 peak of $147 in January.

In the quarter ended March 31, UHS’s revenues were $2.83 billion, slightly better than they were in the same period of 2019, but its net income fell 39% as it dealt with COVID-19. To save money, the company suspended its quarterly dividend of 20 cents per share.

In the Philadelphia region, UHS owns Brooke Glen Behavioral Hospital in Fort Washington, Foundations Behavioral Health in Doylestown, the Horsham Clinic in Ambler, and Keystone Center in Wallingford, as well as Fairmount Behavioral Health System and Friends Hospital in Philadelphia.

In the United States, UHS operates 185 inpatient psychiatric facilities.

Its also operates 26 acute-care hospitals, but none are in the Philadelphia area.