"When National Guard units are not under federal control, the governor is the commander-in-chief of the units of his or her respective state or territory (such as Puerto Rico, Guam and the Virgin Islands). The President of the United States commands the District of Columbia National Guard, though this command is routinely delegated to the Commanding General of the DC National Guard. States are free to employ their National Guard forces under state control for state purposes and at state expense as provided in the state's constitution and statutes. In doing so, governors, as commanders-in-chief, can directly access and utilize the Guard's federally assigned aircraft, vehicles and other equipment so long as the federal government is reimbursed for the use of fungible equipment and supplies such as fuel, food stocks, etc. This is the authority under which governors activate and deploy National Guard forces in response to natural disasters. It is also the authority under which governors deploy National Guard forces in response to man-made emergencies such as riots and civil unrest, or terrorist attacks."
Wiki on The National Guard of the United States
"The Act, as modified in 1981, refers to the Armed Forces of the United States. It does not apply to the National Guard under state authority acting in a law enforcement capacity within its home state or in an adjacent state if invited by that state's governor." Wiki on The Posse Comitatus Act
Having been both an enlisted (sergeant E-5) National Guardsman and an officer (colonel O-6) of the Regular Army of the United States, I have a deep interest in the employment of these forces.
For the benefit of non-Americans it should be explained that the National Guard is the federally funded portion of the constitutionally guaranteed militias of the separate states and the District of Columbia. Many states have militia activities (state guards, etc.) that have nothing to do with the federal government and which, in some cases, are armed. The federal government has no control over those non-NG forces.
In the case of the National Guard, its units are subordinate to both the state and federal governments. Under the "normal" conditions of unit training at home stations (local armories) these units are constitutionally subordinate to the state governor as prescribed in state law and are available for employment by the state government without regard to federal wishes so long as the state government does not ask for federal money to support such operations. In other words, if the state wants to use the NG for purposes separate from federal policy then the state must pay the expense of the operation.
The federal Posse Comitatus Act (PCA) as cited above applies only to federal forces to include the NG when it has been called by POTUS into federal service under the explict agreement by which the federal government funds, equips and trains the NG. This law prevents the use of federal military forces in civilian law enforcement. The PCA DOES NOT apply to units of the NG when they are in state active duty status.
It is clear that if Governor Perry orders some part of the Texas National Guard to the border in a strictly state active duty status, these forces will have the power of arrest as though they were police.
The question then arises with regard to which laws they could enforce. Border control and immigration are constitutional responsibilities of the federal government. If the federal government does not want NG assistance in enforcing such laws, would the NG under state control have the legal right to make such arrests?
Which laws would the NG be able to enforce? I know not. pl