It was a remarkable feat. On a day when Democratic members of Congress joined protesters outside the government’s largest humanitarian aid agency and the U.S. defense secretary vowed to use active-duty troops to help stem migrant crossings, it was Gov. Philip D. Murphy of New Jersey who managed to be a primary focus of ire on Fox News.

“I think the governor is pretty foolish saying what he said,” Thomas D. Homan, President Trump’s border czar, told the host Sean Hannity late Monday.

Then Mr. Homan threatened to prosecute Mr. Murphy, who days earlier had seemed to imply that he was housing an undocumented immigrant in a garage apartment on his luxe waterfront estate in Middletown, N.J.

“Won’t let it go,” Mr. Homan promised. “We’ll look into it.”

If Mr. Murphy was, indeed, “concealing an illegal alien,” he said, “I will seek prosecution.”

The warning stemmed from odd and misleading comments Mr. Murphy made Saturday during a freewheeling discussion before an audience at a New Jersey college. The conversation with a leader of a left-leaning political group was streamed live and posted to YouTube.

“There’s someone in our broader universe whose immigration status is not yet at the point that they are trying to get it to,” Mr. Murphy said. “And we said, ‘You know what? Let’s have her live at our house above our garage.’

“And good luck to the feds coming in to try to get her,” he said.

An aide to the governor clarified on Monday that the woman in question was in the country legally and had never lived on the Murphy family’s property. The aide did not make clear what sort of relationship, if any, the woman had with the governor or his wife.

But news articles had already begun to amplify the statements, compounding the confusion. Elon Musk, whom Mr. Trump has afforded an extraordinary degree of power to reshape government, responded to Mr. Murphy’s comments with a one-word post on X: “Wow.”

By Tuesday afternoon, the post had been viewed more than 14 million times.

The drama played out as some blue-state politicians and Democratic activists have struggled to find ways to push back against Mr. Trump’s breathtaking efforts to rapidly alter federal policy.

Dozens of protesters gathered Tuesday outside Senator Cory Booker’s office in Newark to demand that Senate Democrats “recognize that the country is in the midst of a national emergency and act accordingly.”

They carried signs that urged a more strenuous opposition to Mr. Trump’s policies. “We elect leaders, not oligarchs,” one handwritten placard read. “Stop the coup.”

“Block. Delay. Obstruct,” read another.

A spokesman for Mr. Booker said that the senator remained “steadfastly committed to countering any of the Trump administration’s attempts to shortchange and undermine the well-being of New Jerseyans and Americans across the country.”

On Monday, New Jersey’s other senator, Andy Kim, a first-term Democrat, was among dozens of protesters and members of Congress who gathered in Washington outside the offices of the U.S. Agency for International Development, an agency thrown into turmoil after Mr. Musk claimed he had spoken with the president and that he had agreed that U.S.A.I.D. should be shut down. Most employees overseas have been instructed to return home as personnel were told that they will be placed on leave on Friday.

The chaos unfolded against a backdrop of growing fear among immigrants in New Jersey.

There are an estimated 475,000 undocumented immigrants in New Jersey, a small but densely populated state of 9.5 million residents.

Several days after Mr. Trump took office, an immigration raid at a fish distribution business in Newark resulted in three arrests, a relatively small number in a state where last year Immigration and Customs Enforcement officers detained more than 3,900 people. But it drew widespread news coverage after Newark’s mayor claimed that ICE agents had entered a nonpublic part of the facility without showing a warrant.

Immigrant advocates have warned that the increased threat of arrest has pushed immigrants who are central to New Jersey’s economy even further into the shadows. They have also called on Mr. Murphy to do far more, including by enacting a law that would make it harder for federal officials to arrest undocumented immigrants.

Asked about his plans to confront Mr. Trump’s policies on immigration, Mr. Murphy has twice offered personal stories. The day after Mr. Trump was elected, the governor recalled a time he had gone to a location near his home where immigrants gather before work, suggesting that his presence served as a deterrent to deportation.

He repeated that story on Saturday and added a description of the woman who he seemed to suggest was living at his home.

Mr. Murphy’s home in Middletown, where he and his wife raised their four children, is protected around the clock by State Police troopers, who are stationed near the mansion’s front entrance. It is unclear if he was suggesting that he would support a showdown between ICE agents and his security detail.

The governor’s spokesman, Mahen Gunaratna, declined to comment Tuesday about Mr. Homan’s comments on Fox News, and he said that Mr. Murphy’s statements on Saturday were meant to be more hypothetical than literal.

“He was just recounting what his reaction was to someone who was on edge,” Mr. Gunaratna said.

If the governor had been allowing an undocumented immigrant to live in his garage, Mr. Homan said, it would be a violation of a federal statute he cited by number, “1324,” which outlaws efforts to conceal, harbor or shield an undocumented immigrant “from detection.”

Mr. Murphy has praised the New Jersey attorney general’s leadership in using the courts to block, at least temporarily, Mr. Trump’s effort to end birthright citizenship.

But he has also stressed his willingness to work with the Trump administration, if doing so does not violate what he has called “New Jersey values.”