The Pentagon is preparing to loosen rules that bar troops from interacting with migrants entering the United States, expanding the military’s involvement in President Trump’s operation along the southern border.

Senior Defense Department officials have recommended that acting defense secretary Patrick Shanahan approve a new request from the Department of Homeland Security to provide military lawyers, cooks and drivers to assist with handling a surge of migrants along the border.

The move would require authorizing waivers for about 300 troops to a long-standing policy prohibiting military personnel from coming into contact with migrants.

The Pentagon has approved only one previous request to waive the policy since the beginning of Trump’s recent border buildup, to help provide migrants with emergency medical care. There are about 2,900 active-duty troops and 2,000 National Guardsmen along the border.

According to internal Pentagon documents obtained by The Washington Post, the requested expansion of military activity along the border would cost an estimated $21.9 million through the end of fiscal year 2019.

As part of the proposal, military attorneys would assist with deportation hearings in immigration courts across the country. The proposed move has already generated concern from military officers who worry it would drag their nonpartisan institution further into a divisive domestic political issue.

In a sign of the sensitivities surrounding a move that might be seen as putting troops in a law enforcement role, the documents note that military personnel would remain in a “segregated driver’s compartment” when driving migrants to detention facilities. Customs and Border Protection officials would provide security on those trips.

The soldiers would also be asked to hand out snacks and refreshments to migrants in detention, where families often receive items such as cookies, crackers and juice boxes between meals. CBP agents often complain such tasks amount to “babysitting” duties and say their time would be better spent guarding the border.

Troops would be accompanied by law enforcement personnel as they provide migrants food and periodically check on their welfare.

All those activities, the documents note, require Shanahan to “grant a temporary exception to the ‘no contact with migrants’ policy.” The documents also note that military personnel are barred from undertaking law enforcement activities in keeping with the Posse Comitatus Act.

The order drew concerns from policy experts who worry about the politicization of the military.

“To lean on the military to handle these functions that are not [military] in nature is essentially choosing to not invest in governance and relying on the military to make up the gap,” said Alice Hunt Friend, a former Pentagon policy official and senior fellow at the Center for Strategic and International Studies. “We’ve seen that happen overseas for years, and now we are seeing it at home and that’s very concerning. This is mission creep for the U.S. military. A few hundred personnel doesn’t break any dams, but it is a really worrying sign.”

Friend also worried about the implications of the military being thrust into a battle between the White House and Congress. “I do worry there will be more conflation of the military with those kinds of politics even though the military isn’t doing anything other than following lawful orders,” she said.

The request comes as an unprecedented surge of Central American families arriving at the U.S. southern border pushes American agents to “the breaking point,” according to DHS officials. Last month, U.S. authorities processed more than 103,000 migrants, the highest one-month total in more than a decade.

Tyler Houlton, a Homeland Security spokesman, said the DHS has been “transparent and vocal” about its need for help from the Defense Department along the border.

“We appreciate DoD’s long history of assistance on all our border security missions and its storied mission of providing humanitarian aid around the world,” Houlton said Friday in a statement. “The current crisis requires DoD’s assistance in both of those roles, which will be provided in a manner that fully complies with applicable law.”

Border Patrol officials say overwhelmed agents are being pulled away from their law enforcement duties because they are so busy caring for migrant parents and children. The shortage of drivers and agents who can chaperone migrants to hospitals has been especially acute.

In the El Paso area, where the strain on Border Patrol resources has been greatest, groups of migrant families who cross the border to surrender to authorities sometimes wait for hours because there are no agents to come pick them up with vans and buses.

CBP officers have been reassigned from ports of entry to drive vehicles and perform other support roles for border agents, but that has exacerbated wait times for commercial trucks and passenger vehicles crossing from Mexico.

Immigration law is one of the most complex and politically fraught areas of federal law, often compared to the tax code for its intricacy, which could complicate the potential assignment of military lawyers to migrants’ cases.

According to Dana Leigh Marks, an immigration judge, having military lawyers with little or no experience in such cases could slow down the proceedings because judges will have to explain procedures to them.

“I’ve never heard of it in my 40 years,” said Marks, a San Francisco judge who spoke in her capacity as past president of the National Association of Immigration Judges. “It’s one more slug in the belly that takes your breath away.”

The immigration court backlog has soared past 850,000 cases under Trump, up from more than 630,000 cases in October 2017, after he took office.

Immigration courts can often be the scene of dramatic and emotional testimony by immigrants, many of whom have claimed asylum on grounds that they fear for their lives if forced to return home.

Under the new proposal, military lawyers would be detailed to Immigration and Customs Enforcement (ICE) and would be supervised by ICE personnel as they work on immigration cases.

“Attorneys aren’t interchangeable at the drop of a hat,” said Ashley Tabaddor, president of the union that represents federal immigration judges.

The judges’ union has urged Congress for years to remove immigration courts from the Justice Department and create a more neutral system that is less subject to executive branch politics.

The proposal did not specify whether the military personnel conducting new border-related duties would be armed. Some troops along the border are armed, and some are not.

Maria Sacchetti and Paul Sonne contributed to this report.