President Trump on Thursday hit back at Speaker Nancy Pelosi (D-Calif.) for warning she may postpone the State of the Union address by scrapping her planned trip overseas.

In a letter to Pelosi, Trump told her that a congressional delegation trip she intended to take to Brussels, Egypt and Afghanistan, which he dismissed as a "public relations event," is now "postponed."

"We will reschedule this seven-day excursion when the shutdown is over," Trump wrote. "I also feel that, during this period, it would be better if you were in Washington negotiating with me and joining the Strong Border Security movement to end the shutdown."

The announcement means that Trump will refuse to provide military transportation for lawmakers to make the journey, which would have included a stop in a war zone, according to the White House.

Trump added, however, if Pelosi wanted to go ahead by flying commercial, "that would certainly be your prerogative."

The letter was Trump's first response to Pelosi's proposal to move the State of the Union back from its scheduled date on Jan. 29. Pelosi cited security concerns related to the record-long shutdown.

The White House had remained unusually silent in the 24 hours after the Speaker sent her letter and officials had said they were in no rush to respond.

"If she had gone on this trip, she would have guaranteed that 800,000 federal workers would not receive their second paycheck because she would not have been here to negotiate any kind of deal," White House press secretary Sarah Huckabee Sanders said in an email explaining the decision.

Trump did not directly address the Speaker's request to move the date of his speech.

Pelosi's office said the trip, which was not previously announced, would have included meetings with top NATO commanders in Brussels "to affirm the United States' ironclad commitment" to the alliance as well as a visit with troops serving in Afghanistan.

Only Democrats were scheduled to take part in the trip, though Republicans had also been invited, according to a senior Democratic aide.

"The purpose of the trip was to express appreciation and thanks to our men and women in uniform for their service and dedication, and to obtain critical national security and intelligence briefings from those on the front lines," Pelosi spokesman Drew Hammill said in a statement.

Hammill also pointed out that Trump and a group of Republican lawmakers made separate, unannounced visits to Iraq during the shutdown. The spokesman said the lawmakers were not scheduled to visit Egypt, even though the president said they were.

A disgusted House Majority Leader Steny Hoyer (D-Md.) blasted Trump over the announcement.

"It demeans the presidency. It demeans the office, because it's so petty," he told reporters on Capitol Hill.

Trump's decision also drew criticism from Sen. Lindsey Graham (R-S.C.), who called it "inappropriate" to deny Pelosi military travel "to visit our troops in Afghanistan, our allies in Egypt and NATO."

"One sophomoric response does not deserve another," Graham, a Trump ally, said in a statement.

He likewise called Pelosi's threat to move the State of the Union "very irresponsible and blatantly political."

The announcement from Trump took lawmakers in Washington by surprise.

A group of House Democrats were sitting on a U.S. Air Force bus waiting to leave the Capitol grounds when the announcement was made and walked off after it became apparent the trip would not go forward, according to reports.

House Intelligence Committee Chairman Adam Schiff (D-Calif.), who had planned to go on the trip, said Democrats were set to reassure allies that "on a very bipartisan basis our commitment to NATO is strong," amid reports that Trump is eyeing an exit from the alliance.

He also questioned why the congressional trip was canceled, while a group of administration officials are still scheduled to visit Davos next week for the World Economic Forum.

"The president's concern about [a trip] into a war zone apparently doesn't apply to a delegation from the administration going to Davos the following week. Because we got confirmation that is still planned."

The White House announced later Thursday it had called off the U.S. delegation's trip to Davos.

Trump's message sent a clear signal that the shutdown, which is now in its 27th day, is not close to being resolved.

The president used a speech at the Pentagon earlier Thursday to rail against Democrats for refusing his demand for $5.7 billion for a wall along the U.S.-Mexico border.

"The party has been hijacked by the open-borders fringe within the party," Trump said. "The radical left becoming the radical Democrats. Hopefully, Democrat lawmakers will step forward to do what is right for our country."

Pelosi pushed back against GOP accusations she was simply trying to deny Trump a national platform to make his case for a wall and said her letter was meant to reinforce her demand that the government reopen.

"I'm not denying the platform at all," she said at a press conference earlier Thursday. "We're saying let's get a date when government is open. Let's pay the employees."

At the Pentagon, officials said they were working to meet the president's order.

"We are aware of the president's directive and we're acting on it," one official told The Hill.

- Mike Lillis and Ellen Mitchell contributed to this report, which was updated at 7:16 p.m.