Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — President Donald Trump on Thursday scrapped a planned trip to the World Economic Forum in Davos, Switzerland, later this month, citing border security only hours after attributing a possible cancellation to the government shutdown.

"Because of the Democrats intransigence on Border Security and the great importance of Safety for our Nation, I am respectfully cancelling my very important trip," Trump wrote on Twitter Thursday while on his way to visit the Texas side of the border. "My warmest regards and apologies to the @WEF!"

But Trump, who said earlier Thursday that he would "probably" claim national emergency powers for himself in a bid to circumvent Congress and build a wall along the U.S.-Mexico border, is in the midst of a partial government shutdown that will enter its fourth week if it is not resolved before Saturday.

While the two issues are being discussed in tandem in Washington, they are not necessarily one and the same.

On the South Lawn of the White House earlier in the day, Trump linked a possible decision to stay home to the shutdown.

"If the shutdown continues, I won't go," he said. "I had planned to go. It has been very successful when I went."

Trump attended the annual summit of the world's wealthiest and most powerful business and political leaders, held in the Swiss Alps, in 2018. This year's meeting is scheduled for Jan. 22 through Jan. 25.