President Donald Trump's promise to use the National Guard to secure the U.S.-Mexico border isn't a new concept and is something the U.S. has done in the past for varying reasons.
Both Presidents George W. Bush and Barack Obama sent National Guard troops to the border when they were in the White House. And throughout the history of the borderlands, the military or armed militias have been dispatched there to keep black slaves from fleeing, remove Native Americans from ancestral lands and suppress Mexican-American revolts stemming from anger over white mob violence.
Here's a look at how the U.S. has used the military and armed militias along the border:
SLAVERY AND CHINESE EXCLUSION
After the U.S. seized Texas and American Southwest following the U.S-Mexico War, armed militias patrolled the border looking for runaway black slaves. The traditional Underground Railroad to the north was too far for slaves to travel so thousands attempted the journey south to freedom. Soon, a guerra sorda, or cold war, developed between the nations.
According to historian James David Nichols, Texas slaveholders took matters into their own hands and sent armed militias to the border and into Mexico to search for runaway slaves. Often Mexico refused to turn over slaves and the conflict sometimes resulted in violent skirmishes.
In the late 1800s and early 1900s, mounted watchmen who patrolled from El Paso, Texas, to California were dispatched largely to look out for Chinese immigrants trying to illegally enter the U.S.
Kelly Lytle Hernandez, a University of California, Los Angeles history professor and author of "Migra!: A History of the U.S. Border Patrol," says initially there were no restrictions on Mexican immigration at the time because U.S. growers wanted a steady stream of agricultural workers.
RELATED: Trump Undecided On Troop Levels At Border
REVOLUTION AND REVOLT
Tensions remained high between white settlers, Mexican-Americans and Native Americans in the newly acquired territory following the U.S-Mexico War.
Miguel Levario, a Texas Tech history professor and author of "Militarizing the Border: When Mexicans Became the Enemy," said the U.S. government erected military bases such as Fort Bliss in El Paso, Texas, for the sole purpose of removing Native Americans from lands. "It had little to do with immigration," Levario said.
As the Mexican Revolution began in Mexico around 1910, white settlers feared Mexican-Americans might take up arms on behalf of Mexican Revolutionary leader Pancho Villa.
When Villa soldiers in northern Mexico killed 19 white engineers and staff from an American mining company, drunken U.S. soldiers sought revenge in El Paso and attacked Mexican-Americans in poor El Paso neighborhoods, sparking a riot in 1916. El Paso police also are believed to have sought revenge and set fire to Mexican inmates in the El Paso jail, killing 27, Levario said. The inmates were doused with coal oil and gasoline as a crude disinfectant, he said.
What happened at the jail helped push Villa to raid the small town of Columbus, New Mexico. The violent raid angered whites and President Woodrow Wilson, who ordered Gen. John J. Pershing to invade Mexico to arrest Villa. The U.S. Army never caught him.
National Guard units from around the country were called up and more than 100,000 troops were sent to the border.
RELATED: AP FACT CHECK: Trump Misses Mark On State Of Mexico Border
IMMIGRATION AND DRUGS
Congress created the U.S. Border Patrol in 1924 and the agency slowly grew in size as its mission changed. At first, the agents sought to keep out Asian immigrants and later worked to stall alcohol trafficking in the Prohibition era. Slowly, it evolved into stalling unwanted migration from Mexico.
Occasionally, U.S. presidents have sent the military or the National Guard to the border region to help the Border Patrol stem a crisis amid controversy with border residents.
In 1997, camouflage-clad U.S. Marines ordered to patrol the border for drugs in West Texas shot and killed 18-year-old Esequiel Hernandez Jr. while he was herding his family's goats near the tiny village of Redford, Texas, along the U.S.-Mexico border. Authorities say Hernandez had no connection to the drug trade and was an honor student.
That shooting sparked anger along the border and ended the President Bill Clinton-era military presence along the border. After Sept. 11, President George W. Bush sent unarmed National Guard units to the border for support, Levario said.
In 2010, President Barack Obama deployed National Guard troops to the border over fear of increasing drug-trafficking violence.
Today, there are more than 20,000 Border Patrol agents along the U.S.-Mexico border, and a number of other federal agencies have a presence as well.