Senate Republicans on Monday suggested that partisanship was behind ex-Attorney General Sally Yates' decision not to defend the Trump administration's executive order on travel.

Yates was fired by President Trump after her controversial decision, which came out just days after the Justice Department's Office of Legal Counsel decided Trump's order was legal.

Sen. John Kennedy, R-La., pressed the issue in a Senate Judiciary subcommittee by asking her bluntly, "Who appointed you to the United States Supreme Court?"

Yates described her reasoning more fully in answers to Sen. Ted Cruz, R-Texas, who used the hearing to press Yates on why she made that unprecedented move. Cruz cited federal law saying the president can suspend the entry of aliens if U.S. security is at risk.

Yates countered by citing another law saying discrimination is illegal in the area of immigration law, and worried Trump's order was unconstitutional. But Cruz said that revealed her to be a partisan.

"There is no doubt the arguments you laid out are arguments that we can expect litigants to bring, partisan litigants who disagree with the policy decision of the president," he said.

Cruz also pressed her on why she made her decision after the Office of Legal Counsel approved it, and asked her if she was aware of another example in which the Attorney General rejected that office's decision.

"I'm not, but I'm also not aware of a situation where the Office of Legal Counsel was advised not to tell the Attorney General about it until after it was over," she said.

"I would note that might be the case if there's reason to suspect partisanship," Cruz replied, drawing a groan from Sen. Dick Durbin, D-Ill.