Robert Bauer.

Robert Bauer, the Democratic Party legal stalwart who served as White House counsel to President Barack Obama, is leaving Perkins Coie after nearly four decades at the firm.

The firm said Bauer will continue to represent several of his existing clients on an individual basis and will serve as co-counsel with Perkins Coie on some of those matters. Bauer will also devote more time to teaching at New York University School of Law.

Bauer was not immediately available to comment, but in a statement he expressed gratitude for his time at Perkins Coie and said he was eager to continue working with colleagues at the firm as a former partner.

“When I came out of law school in 1976, the country was just beginning to regulate the political process in a way that hadn’t been true before,” Bauer said. “At Perkins Coie, we built a practice and defined the field in a way that you just do not find at other law firms. I’m proud of the work we have accomplished, the team we have built and the clients we continue to serve.”

Bauer started at Perkins Coie in 1980, founding the firm’s political law practice. In the ensuing 38 years, he stepped away only twice—to serve as counsel to the Senate minority leader during former President Bill Clinton’s impeachment trial of 1999, and when working as Obama’s White House counsel from 2010 through July 2011.

After leaving the firm, Perkins Coie said, Bauer will continue to write and split his time between New York City and Washington, D.C. He will also remain as personal counsel to Obama and continue working with The Obama Foundation and The Biden Foundation as clients.

Though Perkins Coie is headquartered in Seattle, it has an outsize presence in D.C. thanks to its leading political law practice. The group, known for its longtime work for the Democratic National Committee and other Democratic groups and politicians, has been chaired since 2009 by Marc Elias, who was counsel of record for Hillary Clinton’s 2016 presidential campaign.

Perkins Coie has also attracted attention in recent months based on reports that the firm played a role in funding research by Fusion GPS that led to the “Steele dossier” proffering ties between Donald Trump’s presidential campaign and the Kremlin.

Bauer has not been shy about commenting on controversies surrounding the Trump administration, including writing in support of former FBI director James Comey and arguing that Congress should enact legislation requiring special counsel Robert Mueller to issue a report to legislators if Mueller is fired by the president.