Sen. Mark Warner (D-VA) accused President Donald Trump of breaking the law by revealing House Speaker Nancy Pelosi’s (D-CA) scheduled visit to Afganistan in canceling House Democrats’ seven-day foreign trip as the White House of congressional leaders remain at odds over the partial government.

“I don’t understand if Mr. Trump understands the laws and procedures in our country,” Warner told CBS capitol hill reporter Alan He when asked about the trip’s cancelation. “I don’t know what Speaker Pelosi is doing, not doing. Sometimes members take trips into dangerous areas, and only announced after the fact.”

“I have been to Afganistan on multiple occasions,” Sen. Tim Kaine (D-VA) chimed in, claiming that none of his trips had ever been announced in advance. “That never, never happens. Never.”

“For the president to try to a) announce in advance, which created a security challenge for her, and b) try to hobble her going by telling the speaker that the speaker can’t use MilAir, this guy is so unbelievably petty,” he added.

Asked Sen. Warner & Kaine about Trump revealing Pelosi's CODEL to Afghanistan. Both were stunned. KAINE: “I have been to Afghanistan on multiple occasions. It has never been announced that I’m going to Afghanistan. That never happens. Never… this guy is so unbelievably petty.” pic.twitter.com/yLhqlgxepd — Alan He (@alanhe) January 17, 2019

Warner then accused the president of breaking protocol — even putting Pelosi’s life in danger.

“If someone had revealed about the president’s trip beforehand, around Christmas when he went to the war zone — if someone had revealed that beforehand, that would have been a violation of law, policy, and procedure,” Warner said. I don’t know why what the president may have done today isn’t that same kind of violation.”

Earlier Thursday, President Trump wrote in a letter to Pelosi that he was revoking access to a military plane for her trip to Egypt, Brussels, and Afghanistan, stating: “In light of the 800,000 great American workers not receiving pay, I’m sure you would agree that postponing this public relations event is totally appropriate.”

“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,” he continued. President Trump said Pelosi was welcome to fly on a commercial plane to make the visit. “Obviously, if you would like to make your journey by flying commercial, that would certainly be your prerogative,” he wrote.

Read the full letter below: