(CN) – Faced with a subpoena by House Democrats and President Trump’s claim of “constitutional immunity,” a former aide to the president filed a lawsuit late Friday that asks a federal judge to determine if he is required to testify in the impeachment inquiry, a decision that could affect other witnesses who worked closely with the president.

Charles Kupperman, the former deputy national security adviser for President Donald Trump, was scheduled to testify on Monday. But Trump sought to halt Kupperman from talking, and invoked constitutional immunity on Friday.

“Plaintiff obviously cannot satisfy the competing demands of both the legislative and executive branches, and he is aware of no controlling judicial authority definitively establishing which branch’s command should prevail,” the complaint states.

Kupperman filed the lawsuit in Washington against the president and leaders of the House committees overseeing the impeachment inquiry. In his complaint, Kupperman said White House counsel Pat Cipollone told him not to show up Monday, saying that he is “absolutely immune from compelled congressional testimony with respect to matters related to his service as a senior adviser.”

The House investigatory committees want to hear from Kupperman about allegations that President Trump withheld aid from Ukraine in exchange for an investigation into his political rival Joe Biden and his son, Hunter. As a top aide, Kupperman was responsible for advising the president over national security policies toward Ukraine.

Kupperman is represented by attorney Charles Cooper, who is also representing former national security adviser John Bolton. House Democrats have spoken to Cooper about having Bolton testify. As part of Trump’s inner circle at the White House, both men are seen as credible witnesses the president would be unlikely to handwave away like he’s done with diplomats working for the State Department.

Former White House Don McGahn had previously refused a House subpoena to testify, a matter that is now being fought in the courts. Rather than not show up, Kupperman is suing the president and Congress in order to receive a solid ruling from the judiciary.

“In short, there is no definitive judicial authority resolving the question whether Plaintiff is bound to abide by the President’s assertion of immunity or to comply with the House Defendants’ subpoena,” the lawsuit states.