WASHINGTON -- The Pentagon has approved GI Bill eligibility for National Guard troops stationed at the U.S.-Mexico border after nearly a year of confusion over whether stateside service entitles soldiers to federal benefits.

Defense Secretary Mark Esper wrote in a memo Thursday that National Guard troops performing active service responding to a national emergency declaration by the president can accrue GI Bill benefits, unlike most other domestic service, which does not entitle guard members to federal benefits. Until now, guard troops deployed to the southern border weren't accruing GI Bill benefits and there has been confusion on the ground and in Washington about whether responding to domestic emergencies entitles troops to those benefits.

President Donald Trump declared a national emergency on the southern border on Feb. 15 to allocate money for his proposed border wall and expand other security efforts to combat illegal immigration. Troops who deployed to the border can accrue GI Bill benefits since the declaration. The longer that service members are on active duty, the more valuable their GI Bill benefits become to them.

Thousands of National Guard troops have been mobilized for the southern border mission, the bulk of them from the Texas National Guard, according to military records. Some troops said they have spent months and even up to a year on the border. In all cases, guard members are leaving their civilian employers for a sizable amount of time -- sometimes taking a pay cut to serve. Esper approved up to 5,500 service members to continue operations along the U.S.-Mexico border in fiscal year 2020, which started Sept. 30. More than 2,000 of the troops at the border are National Guard members.

"Whether it's to South Korea, Afghanistan, or right here at home, all those that deploy in defense of our nation have earned the right to use the GI bill to pursue their educational goals after they separate from military service," Rep. Phil Roe, R-Tenn., said in a statement. "I applaud the Secretary of Defense for doing the right thing and reversing this ill-advised policy that prohibited certain members of the National Guard deployed to the southern border in service of a national emergency from receiving active-duty service credit toward the Post-9/11 GI Bill."

Esper said the secretaries of the Army and Air Force will ensure guard troops serving on the border mission will have a record proving their eligibility for federal benefits.

To qualify for post-9/11 GI Bill benefits, troops must complete 90 days of active duty. Typical National Guard service is not considered active duty, with most guard members banking on their deployments overseas to cover a lot of the living costs while going to school.

Some Republicans wrote a letter to Esper in September asking why guard troops weren't earning the benefits that they should be and those concerns were echoed in a congressional hearing where military officials couldn't explain to lawmakers why guard troops were being seemingly shortchanged.

"I'm glad to see the Department of Defense acknowledge the inconsistency of its prior policy and congressional intent on this important matter, and that these brave young men and women will receive the benefits they deserve," Gus Bilirakis, R-Fla., said in a statement.

Sometimes troops can be deployed for under a week, such as the Maryland National Guard's deployment to the Baltimore riots in 2015. In other cases, guard units can be deployed for months on domestic missions, such as hurricane relief and non-combat service to South Korea and Eastern Europe, which has spurred questions in Washington over the disparity in pay and benefits between guard members and active-duty troops. It is possible for a guard unit's annual training -- marketed as "two weeks in the summer" -- to end up being three to five weeks.

"This [House Committee on Veterans' Affairs] has been focused on pushing Congress and the [Trump] administration to update benefits for National Guard and Reservist service members," House VA Committee chairman Rep. Mark Takano, D-Calif., said in a statement. "The solution for these members -- who serve side-by-side, confront similar risks, and yet receive disparate pay and benefits -- should be simple. Same job, same pay."

For combat deployments, National Guard troops are compensated on par with active-duty troops in places such as Syria, Afghanistan and Iraq.