President Trump made headlines Tuesday when he said he wants to send U.S. military personnel to guard the southern border with Mexico and prevent illegal crossings. But it wouldn't be the first time the U.S. has had a military presence at the border.

CBS News' David Martin notes that the U.S. National Guard has deployed personnel to the border under both Presidents George W. Bush and Barack Obama. But the guard members had no authority to pursue, or detain, immigrants attempting to cross the border — that remained the job of U.S. Customs and Border Protection agents. A law called the Posse Comitatus Act of 1878 restricts the military from performing the tasks of U.S. civilian law enforcement — like arrests, apprehensions and detentions — unless explicitly authorized by Congress. The National Guard is exempt from the law, but has its own regulations restricting its members from such activity.

It is unclear if Mr. Trump intends to send the National Guard, or another military branch. He didn't specify on Tuesday. A spokesman for the National Guard told CBS News it has "not received any tasking" yet from the Trump administration for sending troops to the border.

Get Breaking News Delivered to Your Inbox

"We don't have laws. We have catch and release," Mr. Trump said Tuesday in a press conference with Baltic State leaders. "You catch and then you immediately release, and people come back years later for a court case, except they virtually never come back. So we are preparing for the military to secure our border between Mexico and the United States. We have a meeting on it in a little while with General (James) Mattis and everybody. And I think that it's something we have to do. Now, the caravan, which is over a thousand people coming in from Honduras, thought they were just going to walk right through Mexico and right through the border."

The two-year border operation under Bush, beginning in 2006, was called Operation Jump Start, and involved a maximum of 6,000 troops along the border. Their mission was to relieve border patrol agents when possible, enable surveillance capabilities, increase the country's intelligence capabilities, offer transportation and provide tactical infrastructure, like fences, roads and detention facilities, according to the National Guard.

The 2012 operation under Obama was called Operation Phalanx, and involved 1,200 personnel, but had more aviation assets, Martin says. In terms of what the National Guard set out to do, the goals were similar. According to the National Guard, its soldiers and airmen served as a force multiplier for the border patrol agents on the ground, spotting border intrusions and offering technical support. The National Guard aided with ground surveillance, criminal investigative aid, transportation, and other support.

The U.S. Army, in the distant past, has also helped secure the border. A scholarly paper published on the U.S. Army's website details the security missions carried out between 1846 and the early 20th century.

"Since the mid-19th century, the United States has frequently employed the U.S. Army on its southern border to perform various roles in support of the nation — from outright war, to patrolling the border, to chasing bandits while securing persons and property on both sides of the border, and most recently to supporting civil law enforcement and anti-drug efforts," wrote Col. Timothy Reese, Director of Combat Studies Institute Press in a 2012 forward to the publication, "Mexican Border: A Historical Perspective."