WASHINGTON — President Donald Trump said Thursday that he was canceling Speaker Nancy Pelosi's previously undisclosed trip to war-torn Afghanistan, telling the woman second in line to the presidency that she can't use a military jet but is welcome to fly commercially if she wants.

A U.S. Air Force bus loaded with lawmakers, including Reps. Adam Schiff, D-Calif., Stephen Lynch, D-Mass., Elaine Luria, D-Va., and Mark Takano, D-Calif., held in place near the Capitol and returned to the building to let passengers off about 3 p.m. Thursday.

Trump’s letter, which cited the ongoing partial government shutdown as the reason for his decision, comes a day after Pelosi told the president he should postpone his Jan. 29 State of the Union address or submit it in writing because the Department of Homeland Security hasn’t been funded for the current year.

“Due to the Shutdown, I am sorry to inform you that your trip to Brussels, Egypt and Afghanistan has been postponed,” Trump wrote. “In light of the 800,000 great American workers not receiving pay, I am sure you would agree that postponing this public relations event is totally appropriate.”

Trump said in his letter that Pelosi could reschedule the trip after the government has re-opened.

"It would be better if you were in Washington negotiating with me and joining the Strong Border Security movement,“ he wrote, but “if you would like to make your journey flying commercial, that would certainly be your prerogative.”

Pelosi's spokesman Drew Hammill pointed out in a multi-part response on Twitter that Trump visited U.S. troops in Iraq shortly after the partial government shutdown went into effect last month.

The purpose of Pelosi's planned trip "was to express appreciation & thanks to our men & women in uniform for their service & dedication, & to obtain critical national security & intelligence briefings from those on the front lines," Hammill wrote.

The itinerary included a required stop in Brussels to allow the pilot to rest, the statement said, adding that the delegation planned to meet NATO commanders, U.S. military leaders and key allies "to affirm the United States’ ironclad commitment to the NATO alliance." The trip did not include a stop in Egypt, Hammill said.

The purpose of the trip was to express appreciation & thanks to our men & women in uniform for their service & dedication, & to obtain critical national security & intelligence briefings from those on the front lines. (3/4) — Drew Hammill (@Drew_Hammill) January 17, 2019

A White House official told NBC News that Trump had decided to ground all congressional delegation trips abroad during the shutdown.

Several hours later, White House press secretary Sarah Sanders said in a statement that “[o]ut of consideration for the 800,000 great American workers not receiving pay and to ensure his team can assist as needed, President Trump has canceled his Delegation’s trip to the World Economic Forum in Davos, Switzerland.”

The announcement came two days after the White House released an updated list of Trump officials slated to attend the gathering, including secretary of state Mike Pompeo and secretary of commerce Wilbur Ross.

Last year, Lynch wrote an amendment to the annual bill authorizing Pentagon operations that would have required the Defense Department to assist members of Congress trying to visit Iraq, Afghanistan, Syria and Kuwait. The amendment was designed to counter restrictions that Democrats said were being placed on their travel to those regions. It was killed in the House Rules Committee, which was then controlled by Republicans, and never got a vote on the House floor.

Trump's letter only dealt with Pelosi's travel, and Rep. Gerry Connolly, D-Va., a member of the House Foreign Affairs Committee, said the president should not have interfered with the speaker's effort to visit with troops.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"In a presidency full of new lows, this is yet another one," said Connolly, who was not planning to go on the trip.

But House Minority Leader Kevin McCarthy, R-Calif., told reporters he thought it was the "appropriate" move for the president to make.

"Why would she want to go overseas with government shut down, with people missing their paychecks?” McCarthy said.

Trump's campaign sent out a fundraising email shortly after his letter to Pelosi asking supporters to donate a total of $1 million over nine hours in response to her request that he not deliver the State of the Union address later this month.

"Nancy Pelosi asked me to reschedule the State of the Union Address given the “security concerns” regarding the government shutdown," Trump wrote. "What about the REAL security concerns at our Southern Border? What about the REAL security concerns of American Citizens and their loved ones?"

Trump's move earned a quick rebuke from one of his closest allies in Congress, Sen. Lindsay Graham, R-S.C.

"One sophomoric response does not deserve another. Speaker Pelosi’s threat to cancel the State of the Union is very irresponsible and blatantly political," Graham said in a statement released to the media. "President Trump denying Speaker Pelosi military travel to visit our troops in Afghanistan, our allies in Egypt and NATO is also inappropriate."

Graham said that he is "glad the Speaker wants to meet our troops," even though he is "disappointed she's playing politics with the State of the Union."

House Majority Leader Steny Hoyer also slammed the decision. "It's petty. It's small. It’s vindictive. It is unbecoming of the President of the United States, and it is an unfortunately daily occurrence," he told reporters.

Earlier Thursday, Pelosi told reporters that her rationale for seeking to reschedule the annual State of the Union address came down to her and other Democrats not wanting to have security officials work the event without being paid.

"Maybe he thinks it's OK not to pay people who work," she said, an apparent jab at the president over allegations that his businesses have stiffed contractors in the past. "I don't. And my caucus doesn't either."

Trump has said in the past that if his companies didn't pay contractors or workers fully, it was because of dissatisfaction with their work, according to news reports.

Pelosi said Thursday that she had "no doubt" that federal security officials were properly trained for the event and could perform their duties regardless of whether the government was shut down, but she said those workers "should be paid for this."

"This is why I said to the president that ... if you don't open up the government, let's discuss a mutually acceptable date," the California Democrat said, adding that the previously agreed upon date of Jan. 29 "isn't sacred for any reason."

On Wednesday, Pelosi wrote Trump a letter saying he should either delay the address or submit it in writing, citing the security burdens that a speech before a joint session of Congress would place on the government during the partial shutdown.

"Sadly, given the security concerns and unless government re-opens this week, I suggest that we work together to determine another suitable date after government has re-opened for this address or for you to consider delivering your State of the Union address in writing to the Congress on January 29th," Pelosi wrote in the letter to Trump.

Parts of the federal government, including some operations of the Department of Homeland Security, have been closed down since Dec. 22, when funding for several federal agencies lapsed amid an an impasse between Trump and Congress over his request for billions of dollars in funding for a border wall.

In separate remarks Thursday, Trump blamed Pelosi and her party's lawmakers for the partial government shutdown.

“The federal government remains shut down because congressional Democrats refuse to approve border security," Trump said, speaking at the Pentagon about the country’s missile defense system. "We’re going to have border security; it’s going to be tight, it’s going to be strong.”

“While many Democrats in the House and Senate would like to make a deal, Speaker Pelosi will not let them negotiate," Trump continued. "The party has been hijacked by the open-borders fringe within the party, the radical left becoming the radical Democrats.”

“Hopefully Democratic lawmakers will step forward to do what is right for our country, and what is right for our country is border security at the strongest level,” he added.

Trump’s comments come as the shutdown is in its 27th day. National polls show that a majority of Americans and voters blame Trump more for the partial government shutdown. They also place his approval rating below where it was on the eve of the 2018 midterms. A recent Gallup poll, for example, has Trump’s approval rating at 37 percent, down from 39 percent last month.

Meanwhile, Homeland Security Secretary Kirstjen Nielsen tweeted on Wednesday that her department is ready and prepared to provide security for Trump's State of the Union speech.

Responding to Nielsen, Pelosi said Thursday that the secretary "should be advocating for her employees to be paid."