United States President Donald Trump on Thursday cancelled his trip to attend the World Economic Forum in Switzerland’s Davos amid the ongoing partial shutdown in the country.

“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 to Davos, Switzerland for the World Economic Forum,” Trump tweeted on Thursday.

Earlier on Thursday, the president had told reporters that he planned to attend the forum scheduled for January 22. He, however, said he would cancel the trip if the shutdown continued, reported The New York Times.

The partial government shutdown entered its 21st day on Friday, making it the second longest in US history, according to USA Today. If the shutdown continues beyond Saturday, it will be the longest ever.

On Wednesday, the president walked out of a meeting with Democrats, calling it a “waste of time”.

The federal government shut down partially after Democrats refused to allocate $5.7 billion funding sought by Trump to build a wall along the border of Mexico. Last week, the House passed legislative measures to reopen the government. But Trump threatened to veto it and the Republican-controlled Senate also decided not to approve the measures.

Trump also threatened to declare a national emergency to secure the money. Constructing the border wall was one of Trump’s main electoral agenda in the 2016 presidential elections.