The Trump administration quietly issued a memo—signed by White House Chief of Staff John Kelly, not President Donald Trump—allowing military troops deployed to the southern border to engage in some limited law enforcement capacity "that the Secretary of Defense determines are reasonably necessary," according to Army Times.
The police powers granted to the military—a show or use of force (including lethal force, where necessary), crowd control, temporary detention, and cursory search—may run afoul of the 1878 Posse Comitatus Act, which limits the use of federal military personnel to enforce domestic policies except in situations specifically authorized by the Constitution or Congress.
The act does not apply to the National Guard or the Coast Guard, allowing those military departments to participate in domestic law enforcement activities such as crowd control and drug interdiction.
According to Army Times, military forces always have the inherent right to self-defense, but defense of the border agents on U.S. soil is new. In addition, troops have been given additional authorities in previous years to assist border agents with drug interdictions, but the widespread authorization of use of force for thousands of active-duty troops is unique to this deployment.