Seven partners at Willkie Farr & Gallagher, a prominent law firm that cut a deal with President Donald Trump to head off a potentially crippling executive order, announced on Friday that they were departing to join a firm that helped successfully challenge one of Trump’s orders in court.

The decision by the partners, who are leaving Willkie Farr to join the law firm Cooley, is the latest of several high-profile departures of lawyers from firms that cut deals with the president.

Cooley represented Jenner & Block in that firm’s legal efforts to challenge an executive order rather than settle with the president. Last month, a federal judge struck down the executive order against Jenner, saying it was “doubly violative of the Constitution.”

Two of the partners leaving Willkie led its San Francisco office: Benedict Y. Hur and Simona Agnolucci, who served as a member of the firm’s executive committee. Both are litigators and have told others they were extremely disappointed that the firm capitulated to Trump, according to two people briefed on the matter.The other partners leaving are Joshua Anderson, Tiffany Lin, Jonathan Patchen, Michael Rome and Eduardo Santacana, Cooley said.

Willkie was a target for Trump’s team primarily because it employed a top investigator for the congressional committee that investigated Trump’s role in the Jan. 6, 2021, attack on the Capitol by a mob of his supporters, according to a person close to the president. The firm also did work on behalf of two Georgia election workers who had successfully sued Rudy Giuliani, Trump’s former personal lawyer.

Former Vice President Kamala Harris’ husband, Doug Emhoff, joined Willkie shortly after Trump was sworn in. Emhoff, who has told others he was making $6 million a year at the firm, opposed the deal, but he has remained at the firm.

In March, when Trump began targeting the legal industry with executive orders, few firms were willing to speak out against the orders, which essentially barred the firms’ lawyers from entering federal buildings and representing their clients before the federal government.

But the deals cut by the law firms to avoid the orders have since been widely criticized within the legal community. As part of their deals with the White House, the firms have agreed to perform hundreds of millions of dollars of pro bono legal work on causes that the administration supports.

The Willke lawyers jumping to Cooley is the latest reshuffling amid the fallout from the executive orders. In just the past month, six top partners at the law firm Paul Weiss, the first firm to cut a deal with Trump, decided to leave. Four of them started their own law firm, while another joined one of the other firms that has successfully fought Trump in court.

Agnolucci and Hur had joined Willkie six years ago to build out the firm’s litigation practice in the Bay Area.

“We are thrilled to welcome this esteemed group of Bay Area leaders and litigators to the firm,” said Rachel Proffitt, the head of Cooley.