One of the nation’s largest nursing home chains agreed to pay $38 million to settle federal and state charges that it wrongly billed Medicare and Medicaid for “effectively worthless” services and failed to provide proper care for some residents.

Extendicare Health Services Inc., which through its subsidiaries operates 146 skilled nursing facilities in 11 states, will pay $32.3 million to the federal government and $5.7 million to eight state Medicaid programs to settle False Claims Act charges. Two whistleblowers will share just more than $2 million for reporting the wrongdoing.