First lady Melania Trump flew to Florida on a US military jet on Thursday hours after President Donald Trump told House Speaker Nancy Pelosi he was canceling her military flight because of the government shutdown, NBC News reported.

The president said in a letter to Pelosi that he was postponing her trip to Afghanistan "in light of the 800,000 great American workers not receiving pay."

NBC News said Melania Trump flew from Joint Base Andrews in Maryland to the Mar-a-Lago resort in Florida.

No federal workers have received paychecks since the partial government shutdown started on December 22.

First lady Melania Trump chartered a military plane to Florida on the same day President Donald Trump said he was canceling House Speaker Nancy Pelosi's trip because of the government shutdown, NBC News reported.

On Thursday, the 27th day of the government shutdown, Melania Trump flew to the Mar-a-Lago resort in Florida from Joint Base Andrews in Maryland on an Air Force jet, NBC News said.

President Donald Trump and Melania Trump at the 9/11 observance at the National 9/11 Pentagon Memorial in Arlington, Virginia, in 2017. Kevin Lamarque/Reuters

Earlier Thursday, Donald Trump told Pelosi he was postponing her trip to Afghanistan "in light of the 800,000 great American workers not receiving pay."

The president said it would be better if Pelosi stayed in Washington to negotiate an end to the shutdown with him and join "the Strong Border Security movement." He told Pelosi she was welcome to pay for commercial flights instead.

The Mar-a-Lago resort in Florida. Joe Raedle/Getty Images

Read more: Melania Trump says she may be the 'most bullied person in the world'

A spokesman for Pelosi, Drew Hammill, rebuked the president's letter in a statement.

"In Brussels, the delegation was scheduled to meet with top NATO commanders, U.S. military leaders and key allies — to affirm the United States' ironclad commitment to the NATO alliance," Hammill said.

House Speaker Nancy Pelosi. Susan Walsh/AP

On Wednesday, Pelosi wrote to the president imploring him to delay his State of the Union address on January 29 or submit it in writing because of "security concerns" caused by the shutdown.

In her letter, Pelosi said the US Secret Service and the Department of Homeland Security lacked the appropriate funding to carry out their duties.

The cancelation of the trip appeared to be a direct response to Pelosi's letter.

The shutdown is a result of the president's request for $5.7 billion from Congress for a border wall. Bill Clark/CQ Roll Call/Getty Images

The government shutdown is the longest in US history. No federal workers have been paid since it started on December 22.

The shutdown hinges on the president's request for $5.7 billion to build a wall along the US-Mexico border. He is facing opposition from Democrats, who think a wall would not be a viable solution to immigration issues in the US and have refused to provide the funding.

NBC News said the flight-tracking website CivMilAir tracked the first lady's flight to Florida: