INDIANAPOLIS (AP) — Indianapolis and several other Indiana cities are joining an estimated $507 million statewide opioid settlement after previously opting out of the state’s lawsuits against opioid manufacturers and distributors.

The Indianapolis Star reports that the state’s capital, the suburbs of Noblesville and Fishers and other cities decided to join the statewide settlement after it was made more attractive by a new state law that gives local governments more direct funding and flexibility.

Indiana’s estimated $507 million share is part of a roughly $26 billion nationwide payout that three opioid distributors and a drugmaker are expected to make to settle lawsuits filed over the nation’s opioid epidemic.