Maryland Gov. Martin O’Malley (D) signed his first piece of legislation of the year on Thursday morning, allowing the state to offer temporary, retroactive health insurance to residents who tried to get coverage through the state’s new online insurance marketplace and failed because of ongoing problems with the Web site.

The emergency legislation, sponsored by his administration, was approved by lawmakers this week. It will expand enrollment in the Maryland Health Insurance Plan, a decade-old, state-run program that was originally created to help people who could not find coverage because of preexisting conditions.

This insurance will be offered as a last-resort option to Marylanders who tried to get coverage through the Maryland Health Benefit Exchange, encountered problems and were left uncovered when 2014 began.

Joshua Sharfstein, Maryland’s secretary of health and mental hygiene, said that the legislation is expected to help “several hundred” people and could cost “several million” dollars. Earlier this month, the four carriers involved with Maryland’s health exchange offered insurance that was retroactive to Jan. 1. More than 1,400 households expressed interest in enrolling, lessening the number expected to need the retroactive insurance set up by this legislation.

“If it affects just one family, it is worth the effort,” O’Malley said during a bill signing ceremony on Thursday morning, “especially depending on the condition or the size of a hospital bill or other treatment bill incurred. I mean, that could be the difference, for some families, between keeping the house and not keeping the house. So it’s important for the one.”

The board that runs the state insurance plan will meet on Thursday or Friday to adopt the new program and formalize policies, Sharfstein said. Marylanders will be allowed to sign up after that.

Applicants will be asked provide evidence that they tried to use the exchange and will have to pay a premium, which is typically more expensive than those offered through the exchange. Enrollment would stay open until March 31. At first, residents will be able to choose insurance that is retroactive to Jan. 1. In coming months, the insurance will be retroactive to Feb. 1 or March 1.