Fifteen months ago, Lilian Calderon was told she had passed her marriage-based green card interview only to be arrested by federal immigration agents minutes later.

The arrest of Calderon, an undocumented Guatemalan mother of two who grew up in Rhode Island, made national headlines as the American Civil Liberties Union of Massachusetts filed a class-action lawsuit alleging that she and others seeking legal status were caught up in a “trap” planned by U.S. Citizenship and Immigration Services and Immigration and Customs Enforcement.

The class-action lawsuit is far from over, but Calderon celebrated a personal victory this week: she got her green card.

“She can now live safely with her husband and children without fear of deportation," the ACLU of Massachusetts tweeted.

A federal judge earlier this month ruled that the ACLU class-action lawsuit can be extended to all of New England, potentially adding “hundreds or thousands” of similarly situated couples to the lawsuit.

Calderon, 31, has lived in Rhode Island since age 3. She and her husband, who have two children, filed a petition more than a year ago to help Calderon gain legal status through marriage.

According to court documents, she and her husband went to the CIS office in Rhode Island near their home in January 2018 for their interview. That day, Calderon was arrested by ICE agents over a final deportation order that had been issued against her. She was sent to a Boston-area detention center pending deportation.

Calderon was released a month later after the ACLU of Massachusetts filed a petition ordering her release and a court order blocking her deportation until she gets a hearing.

The ACLU and firm WilmerHale filed a class-action lawsuit in April 2018 on behalf of Calderon, Lucimar de Souza and other immigrants with U.S.-citizen spouses facing similar circumstances.

For years, immigrant spouses of a U.S. citizen have sought legal status by filing a provisional unlawful presence waiver and applying for a green card through their spouse. The process has long been considered a pathway to citizenship for immigrants regardless of legal status, even for those with formal deportation orders.

The series of arrests at CIS offices called that process into question. In its lawsuit, the ACLU and WilmerHale attorneys obtained emails showing that CIS officials scheduled the interviews around the schedules of ICE agents so they could detain, and in some cases deport, immigrants seeking legal status. ICE agents also asked to space out the interviews to avoid drawing media attention, according to the emails.

While the class-action lawsuit moved forward, Calderon continued her application for legal permanent residency.

She flew to Guatemala for an interview at the U.S. consulate in mid-May — her first time back in the country since she left as a toddler. She flew back in on Sunday and was approved for her green card, said Adriana Lafaille, an attorney at ACLU of Massachusetts.

“Every step in this process has been challenging and surprising for us, and today is no different,” Calderon said Thursday during a news conference in Rhode Island, according to the Providence Journal, "but today, we speak to you with the certainty that our family won’t be separated again due to antiquated immigration laws.”