PROVIDENCE, R.I. — Rhode Island’s attorney general has joined a legal challenge to President Donald Trump’s decision to end federal subsidies that lowered medical costs for millions of Americans.

State Attorney General Peter Kilmartin, a Democrat, joined with nearly 20 states in filing a lawsuit to block Trump’s rollback of health care subsidies that help lower costs for consumers with modest incomes. He said he feels a “moral obligation” to address the issue.

State officials say ending the subsidies will make insurance premiums skyrocket, forcing some consumers to give up coverage completely.

Kyrie Perry, spokeswoman for HealthSource RI, says the impact of Trump’s decision won’t be felt by customers until next year, when premiums will rise substantially impacting all of the nearly 30,000 residents who purchase coverage through the state’s insurance marketplace.