President Donald Trump is edging closer to declaring a national emergency to fund his long-promised border wall, as pressure mounts to find an escape hatch from the three-week impasse that has closed parts of the government, leaving hundreds of thousands of workers without pay.

Some 800,000 workers, more than half of them still on the job, were to miss their first paycheck on Friday under the stoppage, and Washington was close to setting a dubious record for the longest government shutdown in the nation’s history. Those markers — along with growing effects to national parks, food inspections and the economy overall — left some Republicans on Capitol Hill increasingly uncomfortable with Trump’s demands.

Asked about the plight of those going without pay, the president shifted the focus, saying he felt bad “for people that have family members that have been killed” by criminals who came over the border.

Trump visited McAllen, Texas, and the Rio Grande on Thursday to highlight what he calls a crisis of drugs and crime. He said that “if for any reason we don’t get this going” — an agreement with House Democrats who have refused to approve the $5.7 billion he demands for the wall — “I will declare a national emergency.”

There is no evidence of an immigrant crime wave, though. Multiple studies from social scientists and the libertarian think tank Cato Institute have found that people in the U.S. illegally are less likely to commit crime than U.S. citizens are and that those in the country legally are even less likely to do so.

Trump was consulting with White House attorneys and allies about using presidential emergency powers to take unilateral action to construct the wall over the objections of Congress. He claimed his lawyers told him the action would withstand legal scrutiny “100 percent.”

Such a move to bypass Congress’ constitutional control of the nation’s purse strings would spark certain legal challenges and bipartisan cries of executive overreach.

A congressional official said the White House has directed the Army Corps of Engineers to look for billions of dollars earmarked last year for disaster response for Puerto Rico and other areas that could be diverted to a border wall as part of the emergency declaration. The official spoke on the condition of anonymity because the official was not authorized to speak publicly.

On Friday, officials in Puerto Rico called that “unacceptable” and said the island is still struggling to recover from Hurricane Maria, a Category 4 storm that hit more than a year ago and caused more than $100 billion in damage

Gov. Ricardo Rossello said the wall should not be funded “on the pain and suffering” of U.S. citizens who have faced tragedy after a natural disaster.

“To use this now as a political football is not what U.S. citizens in Puerto Rico deserve,” said Jenniffer Gonzalez, Puerto Rico’s representative to Congress. She said the island still has not received $2.5 billion worth of funds. “I vehemently reject anyone playing with our pain and hope.”

It was not clear what a compromise might entail, and there were no indications that one was in the offing. Trump says he won’t reopen the government without money for the wall. Democrats say they favor measures to bolster border security but oppose the long, impregnable barrier that Trump envisions.

Republican Sen. Lindsey Graham of South Carolina said at one point that he didn’t “see a path in Congress” to end the shutdown, then stated later that enough was enough: “It is time for President Trump to use emergency powers to fund the construction of a border wall/barrier.”

Visiting a border patrol station in McAllen, Trump viewed tables piled with weapons and narcotics. Like nearly all drugs trafficked across the border, they were intercepted by agents at official ports of entry, he was told, and not in the remote areas where he wants to extend tall barriers.

Still, he declared: “A wall works. ... Nothing like a wall.”

He argued that the U.S. can’t solve the problem without a “very substantial barrier” along the border, but offered exaggerations about the effectiveness of border walls and current apprehensions of those crossing illegally.

Sitting among border patrol officers, state and local officials and military representatives, Trump insisted he was “winning” the shutdown fight and criticized Democrats for asserting he was manufacturing a sense of crisis in order to declare an emergency. “What is manufactured is the use of the word ‘manufactured,’” Trump said.

As he arrived in Texas, several hundred protesters near the airport in McAllen chanted and waved signs opposing a wall. Across the street, a smaller group chanted back: “Build that wall!”

In Washington, federal workers denounced Trump at a rally with congressional Democrats, demanding he reopen the government so they can get back to work.

On Capitol Hill, House Speaker Nancy Pelosi accused the president of engaging in political games to fire up his most loyal supporters, suggesting that a heated meeting Wednesday with legislators at the White House had been “a setup” so that Trump could walk out of it.

In an ominous sign for those seeking a swift end to the showdown, Trump announced he was canceling his trip to Davos, Switzerland, scheduled for later this month, citing Democrats’ “intransigence” on border security. He was to leave Jan. 21 to attend the World Economic Forum.

The partial shutdown would set a record early Saturday, stretching beyond the 21-day closure that ended Jan 6, 1996, during President Bill Clinton’s administration.

___

Associated Press writers Jill Colvin, Colleen Long, Alan Fram, Deb Riechmann and Zeke Miller in Washington, Nomaan Merchant in McAllen, Texas, and Danica Coto in San Juan contributed to this report.