AUSTIN, Texas — A Mesa Airlines flight attendant, who as a Deferred Action for Childhood Arrivals program recipient is barred from traveling outside the United States under the Trump administration's rules, was released from immigration detention Friday after being taken into custody when she returned to the U.S. on a flight from Mexico that she had worked.

Selene Saavedra Roman, 28, who works for the regional airline based in Phoenix, walked out of the immigration facility Friday evening dragging her Mesa-issued flight bags, according to a representative for the Association of Flight Attendants-CWA who went to meet her and her attorney. She had been held for more than a month.

"Being released is an incredible feeling. I cried and hugged my husband and never wanted to let go," Saavedra Roman said in a statement sent by her attorney Belinda Arroyo to NBC News. "I am thankful and grateful for the amazing people that came to fight for me, and it fills my heart. Thank you everyone that has supported. I am just so happy to have my freedom back."

Mesa erroneously reassured Roman that she could fly to Mexico. But she was taken into custody Feb. 12, upon landing at the George Bush Intercontinental Airport in Houston and placed in immigration detention in Conroe, Texas, Arroyo told NBC News.

Shortly after NBC News reported Saavedra Roman’s detention, news came of her pending release. Her husband, David Watkins, said in a phone call with reporters that Saavedra Roman had contacted him Friday afternoon as news of her detention spread.

“I got the call. She was crying and she said, ‘Please come get me. They are going to release me,'" Watkins said. He was still on his way to pick her up when she was released.

Saavedra Roman's detention was first reported by The Points Guy travel site.

Originally from Peru, Saavedra Roman is enrolled in DACA, the Obama administration program that allows her to remain legally in the country and work.

“We are deeply sorry Selene and her husband have had to endure this situation. It is patently unfair for someone to be detained for six weeks over something that is nothing more than an administrative error and a misunderstanding,” Mesa Chairman and CEO Jonathan Ornstein said. "We are doing everything in our power to ask the administration to release Selene, and drop all charges stemming from this horrible situation."

Saavedra Roman is married to a U.S. citizen and is in the process of applying for legal residency status, but Arroyo said the federal government had threatened to revoke her DACA status while she was in custody.

Under the Obama administration, DACA recipients could apply to travel outside the country. But when President Donald Trump ended the program, such travel was canceled. While court injunctions have prevented the Trump administration from ending DACA for now, the ban on its recipients traveling outside the United States has not been lifted.

The U.S. Citizenship and Immigration Services said it cannot comment on specific cases and cited its January 2018 memo that states that it will not accept or approve "advance parole" requests from DACA recipients. Advance parole is the permission that DACA recipients must get to travel outside the country.

Saavedra Roman has had DACA since 2012, when it first became available to young immigrants who were brought to the country illegally as children and who met certain criteria.

In a statement issued Thursday, Immigration and Customs Enforcement, which is holding Saavedra Roman, verified her arrest and said she was "processed" as a refused crew member, which refers to members of airlines and ship crews who do not have proper documentation to enter the country when they arrive at ports and airports.

Selene Saavedra Roman is a DREAMer with approved status, no criminal history, and simply doing her job as a certified U.S. Flight Attendant. But she was detained by ICE and has been held for over a month with no end in sight. #FreeSelene

Sign the petition: https://t.co/SDwVnbBAnv pic.twitter.com/D4oqiOmaFF — Sara Nelson (@FlyingWithSara) March 22, 2019

Saavedra Roman had told the airline when she was hired about her DACA status, Arroyo said. When she was assigned the Mexico flight, she exchanged several emails with her employer questioning whether she could work the flight because of her status, her attorney added.

The airline told her it was permissible, Arroyo said. Hired in January, Saavedra Roman was still on probation with her employer. She was concerned about losing her job if she rejected the assignment, her attorney said. Arroyo said her client has provided her with emails of her conversations with her supervisors.

“I can’t believe this case has gone on as it has. I thought, 'When they see she has DACA status, that it was a mistake, they are going to parole her and let her out,'" Arroyo said.

Watkins said his wife had put Mexico and Canada on her “no fly” list “very intentionally” when she was hired by Mesa Airlines.

Watkins said he did not know his wife had been sent to Mexico until she was back on the ground and texted him that she landed in Houston and had returned from Mexico. In the next text, she told him she was being detained and asked him to contact her lawyer, he said.

“It has been absolutely terrible,” Watkins said. “Sometimes you have a nightmare and when you wake up you say, ‘Okay the nightmare is over.’ When I go to sleep, I have nightmares. When I wake up, I’m still stuck in the nightmare.”

Sara Nelson, international president of the Association of Flight Attendants-CWA, said it is common for flight attendants to request and be excluded from certain flights. For example, some countries won't accept certain passports, and others won't accept someone with a drunk driving conviction on their record. Some airlines don't require a U.S. passport because they fly only domestically.

The flight attendants association launched a petition with MoveOn.org that calls on the Department of Homeland Security and ICE to drop all charges and release Saavedra Roman. It had more than 6,000 signatures of the 7,500 the group is attempting to collect.

Nelson said the association also is organizing a blitz of lawmakers on Capitol Hill and is reaching out to committees that oversee immigration, the Congressional Hispanic Caucus and others, including Saavedra Roman's local congressman, Rep. Bill Flores, R-Texas, about her case.

"She was a brand-new flight attendant. She asked her company for guidance and raised concerns. This was an administrative error, and justice takes into consideration the realities of the situation," Nelson said. "There is no one looking at this with a reasonable lens."

Watkins said that when his wife was detained, they usually spoke by phone twice a day, in the morning and at night. He was allowed to see her for one hour, once a week “through two-inches of glass. No contact allowed.”

His wife is a graduate of Texas A&M, like Watkins, and she has no criminal history. They were friends for several years before they married in April 2017. She arrived in the U.S. at age 3, the flight attendants association said in its petition.

“I told her, I really hope we don’t spend our anniversary with you in prison,” Watkins told NBC News.

Saavedra Roman had worked as a pre-kindergarten and kindergarten teacher, but after the two traveled around the United States on their honeymoon, Watkins said he suggested she become a flight attendant.

He said he thought she had the personality for it because she is always uplifting, smiling and helping people. They chose a regional airline so she could avoid international travel.

“I proposed the idea,” Watkins said. “I’m kicking myself for it now.”