An Obama-era program that created savings accounts to help more people put away money for retirement is being shut down by the Treasury Department, which deemed the program too expensive.

The 30,000 participants in the program, known as myRA and intended for people who did not have access to workplace savings plans, were sent an email on Friday morning alerting them of the closing. Participants were informed that they could roll the money into a Roth individual retirement account, the Treasury Department said.

President Barack Obama ordered the creation of the so-called starter accounts three years ago, and they became available at the end of 2015. Since then, about 20,000 accounts have been opened, with participants contributing a total of $34 million, according to the Treasury; the median account balance was $500. An additional 10,000 accounts whose owners have not contributed to them have been opened.

Jovita Carranza, the United States treasurer, said in a statement that demand for the accounts was not high enough to justify the expense. The program has cost $70 million since 2014, according to the Treasury, and would cost $10 million a year in the future.