President Donald Trump is considering executive action that would bar migrants from crossing the U.S.-Mexico border and seeking asylum, a senior administration official confirmed late Thursday to ABC News.

Such a move would almost certainly be challenged in court. The push comes just 11 days before crucial midterm elections in which Democrats believe they have a chance to flip the House and several state governor races. That is a scenario that would present a serious challenge to Trump’s agenda, which he has recently described as a “nationalist” approach that puts “America first.”

“The administration is considering a wide range of administrative, legal and legislative options to address the Democrat-created crisis of mass illegal immigration,” the official told ABC News. “No decisions have been made at this time. Nor will we forecast to smugglers or caravans what precise strategies will or will not be deployed.”

The assertion that Democrats created the crisis of illegal immigration in the United States is not accurate. Under both political parties, the U.S. has faced a steady uptick in illegal migration across its southern border, due primarily to war and poverty in Central America. President George W. Bush tried to push through a bipartisan compromise that would have offered the biggest changes to immigration laws in 20 years, including strengthened border security, but it collapsed as hardline conservatives balked at granting some immigrants what they called “amnesty.”

Now, Trump has been focused on what options he has to deliver on his campaign promise to build a wall along the southern border, a proposal that has not had sufficient support in Congress.

With the election days away and several tight races in play, Trump has focused much of his rhetoric on the migrant caravan moving toward the U.S. border, calling it a threat to national security. On Thursday, within minutes of giving a speech on drug prices at the Health and Human Services Department, Trump fired off a tweet on the caravan as though to pivot the conversation back to immigration.

“To those in the Caravan, turnaround, we are not letting people into the United States illegally,” he tweeted. “Go back to your Country and if you want, apply for citizenship like millions of others are doing!”

Donald J. Trump

✔@realDonaldTrump

To those in the Caravan, turnaround, we are not letting people into the United States illegally. Go back to your Country and if you want, apply for citizenship like millions of others are doing!

Trump imposed a travel ban on several majority-Muslim nations shortly after taking office. A version of the ban was ultimately upheld by a sharply divided Supreme Court, with the conservative majority taking his side in support of presidential power.