WASHINGTON (Reuters) - Thousands of Liberian immigrants without permanent legal status in the United States will be eligible to apply for green cards and eventual U.S. citizenship under the terms of a defense spending bill passed by the U.S. Senate on Tuesday.

The pathway to citizenship - even for a relatively small cohort of immigrants - is a victory for pro-migrant activists and lawmakers who pushed for citizenship for Liberians covered by temporary deportation relief programs.

The legalization, which protects Liberians who have been in the country since 2014, is the first of its kind in nearly two decades, according to immigration experts.

U.S. President Donald Trump has attempted to phase out most enrollment in humanitarian immigration programs such as Temporary Protected Status (TPS) and Deferred Enforced Departure (DED), which are offered at the discretion of the administration. Liberians have been protected both by TPS and DED.

Trump unexpectedly postponed a winding down of DED protections for Liberians earlier this year, pushing back the end date until March 2020.

In that announcement, Trump cited the “unique” history of Liberia, a nation founded in 1847 by freed American slaves.

A pair of Democratic U.S. senators, Tina Smith of Minnesota and Jack Reed of Rhode Island, pressed to include the provision for Liberians in the $738 billion National Defense Authorization Act, or NDAA. Minnesota had the largest population of Liberian immigrants of any U.S. state in 2018, according to U.S. Census Bureau estimates.

In an interview with Reuters on Tuesday, Smith said the provision also had support from Senate Foreign Relations Committee Chairman Jim Risch, a Republican from Idaho.

“This was one place where I think we were able to get bipartisan agreement,” she said.

Risch’s office did not immediately respond to a request for comment.

The defense spending bill now will require Trump’s approval to become law.

Trump wrote on Twitter last week that he would sign the bill as soon as it passes, saying it included all his priorities. The White House did not respond to a request for comment on the legalization provision.

Under the terms of the bill, Liberians may apply for permanent residency if they have maintained a continuous presence in the United States since Nov. 20, 2014, when the Obama administration approved TPS for the country following an Ebola outbreak. The time frame includes Liberians covered by that TPS designation and the DED program.

The U.S. Department of Homeland Security has estimated 4,000 Liberians would have been covered by Temporary Protected Status in 2014. Spouses and children of the eligible population also will be permitted to apply for permanent residency, which could push that estimate higher.

Famatta Zeon, a 44-year-old supervisor with U.S. Bank in Minneapolis who left Liberia for the United States in 2001 during that country’s civil war, is one person who could benefit from the measure.

“We are here, we’re good citizens, we’re paying our taxes,” said Zeon, who has three U.S.-citizen children. “We’re doing everything that the country wants us to do.”