The city of Boston has retained a law firm to sue pharmaceutical companies for damages from the deadly opioid epidemic.

Mayor Marty Walsh announced Tuesday he's tapped the South Carolina law firm Motley Rice and expects it will file litigation by the fall.

"Boston, like so many cities across the country, has invested significant time, money and resources to aggressively attack the opioid crisis from every angle," Walsh said in a statement. "Now is the time to finally hold the pharmaceutical industry responsible."

The firm already represents many local governments in actions against opioid manufacturers and distributors, including Chicago, Santa Clara County in California and seven states.

Last week, Massachusetts Attorney General Maura Healey's office sued Purdue Pharma, the maker of OxyContin, alleging the Connecticut company downplayed the prescription painkiller's risks.

Massachusetts is among roughly two dozen states -- including Florida, Nevada, North Carolina, North Dakota, Tennessee and Texas -- that have filed suit against drugmakers recently.

An estimated 2,016 people died of opioid-related overdoses in Massachusetts last year, according to the state. And an estimated 187 Boston residents died of overdoses last year.

With reporting by The Associated Press and the WBUR Newsroom