President Trump turned to an unlikely source Tuesday evening to find support for his hard-line immigration policies: his predecessor, Barack Obama.

Trump tweeted a 2005 video in which Obama, then a senator, made a statement against illegal immigration, accompanied by the comment "I agree with President Obama 100%".

"We are a generous and welcoming people here in the United States," Obama says in the 31-second clip. "But those who enter the country illegally and those who employ them disrespect the rule of law and they are showing disregard for those who are following the law. We simply cannot allow people to pour into the United States undetected, undocumented, unchecked, and circumventing the line of people who are waiting patiently, diligently and lawfully to become immigrants into this country."

Obama is not the only Democrat cited by Trump and his supporters to justify crackdowns on illegal immigration. Another is former President Bill Clinton, whose State of the Union address in 1995 featured the following:

"All Americans ... are rightly disturbed by the large numbers of illegal aliens entering our country," Clinton said that night. "The jobs they hold might otherwise be held by citizens or legal immigrants. The public service they use impose burdens on our taxpayers. That's why our administration has moved aggressively to secure our borders more by hiring a record number of new border guards, by deporting twice as many criminal aliens as ever before, by cracking down on illegal hiring, by barring welfare benefits to illegal aliens."

"We are a nation of immigrants," Clinton added. "But we are also a nation of laws. It is wrong and ultimately self-defeating for a nation of immigrants to permit the kind of abuse of our immigration laws we have seen in recent years, and we must do more to stop it."

Tuesday's tweet came as the Trump administration wrestles with what to do if a caravan of some 7,000 people that originated in Central America arrives at the U.S.-Mexico border. The march appeared to begin as a group of about 160 who decided to band together in Honduras for protection against the gangs who prey on migrants traveling alone; it snowballed as the group moved north. It now has thousands of people and is facing more than 1,000 miles, likely farther, to the end of the journey.

The caravan comes on the heels of a surge in apprehensions of families at the southern border, which has given Trump a fresh talking point to rally his base ahead of next month's midterm elections. Nearly a third of all people apprehended at the U.S.-Mexico border during the budget year 2018 were families and children — about 157,248 out of 395,579 total apprehensions.

In a letter to the Department of Homeland Security and the State Department on Tuesday, Senate Judiciary Chairman Chuck Grassley, R-Iowa, and Sen. Mike Lee, R-Utah, suggested that the administration make a "third party" agreement with Mexico that would force any caravan members seeking asylum to do so in their country of arrival — Mexico. The lawmakers said the process already works that way in Europe.

The Associated Press contributed to this report.