This will be a very complex national emergency. By law it will come down to the governors of each border state to ask for federal assistance and the Posse Comitatus Act.
Here is a good article outlining scenarios of what could happen.
https://www.justsecurity.org/54529/m...key-takeaways/