Just a few weeks ago I met with several women here in Washington, who were caught in a hole in our immigration laws I’ve been working to close, commonly called the widow penalty. In the country legally, they were married to an American and on their way to permanent residency when the unthinkable happened, their spouse died. On top of their heartbreak, these women also face the fear of deportation and leaving behind their spouses’ families, and in some cases, their own American-born children.

Under the current law, a foreigner must be married to an American for at least two years before becoming eligible for legal residency. If the American spouse dies before then, the surviving spouse may be deported—a situation that affects hundreds of widows and widowers.

On June 9, these spouses were given a lifeline by the Obama administration, which halted plans to send the spouses to their home countries. But to give them the opportunity to stay, there needs to be legislation from Congress.

But a permanent solution may soon be on its way to the president’s desk. The measure I filed earlier this year, called the Fairness to Surviving Spouses Act, was included as an amendment to a broader homeland security spending bill that won Senate passage last week. It now looks like it will be also be approved in the House, and will go on to become law with the president’s signature.

While a surviving spouse would still have to prove the legitimacy of the marriage before receiving a green card, he or she would no longer face automatic deportation in response to the death of a spouse.