Wells Fargo announced Thursday that Chief Executive Officer Timothy Sloan informed the banking giant’s board of directors that he will retire, effective June 30. In the meantime, he will immediately step down as CEO, president, and board member.

The board of directors, in response, elected C. Allen Parker, who served as the firm’s general counsel, as interim CEO and president, effective immediately. An external search process will soon begin for a new CEO and president.

In a statement, Sloan reflected on his 31 years at the company, not least of all efforts to restore trust in the bank after a series of scandals and regulatory rebukes. Over the course of two years, and as recently as earlier this month, he has faced pressure to resign by Congressional Democrats in response to the widespread practice of employees secretly opening as many as 3.5 million unauthorized deposit and credit card accounts.

“In my time as CEO, I have focused on leading a process to address past issues and to rebuild trust for the future,” he said. “We have made progress in many areas and, while there remains more work to be done, I am confident in our leadership team and optimistic about the future of Wells Fargo. However, it has become apparent to me that our ability to successfully move Wells Fargo forward from here will benefit from a new CEO and fresh perspectives. For this reason, I have decided it is best for the Company that I step aside and devote my efforts to supporting an effective transition.”

Regarding the external search for a new CEO, Wells Fargo Board Chair Betsy Duke said the board “has a continuous succession planning process through which we identify potential successors within the company.”

“Although we have many talented executives within the Company, the Board has concluded that seeking someone from the outside is the most effective way to complete the transformation at Wells Fargo,” she said. “Accordingly, we will immediately initiate an external search.”

The interim CEO, Parker, 64, served as senior executive vice president and general counsel at Wells Fargo from March 2017 to March 2019. Previously, he was presiding partner at the law firm of Cravath, Swaine & Moore from January 2013 until December 2016.

Given Parker’s new role, Deputy General Counsel Douglas Edwards will serve as interim general counsel and join the company’s Operating Committee, effective immediately. A 24-year Wells Fargo veteran, he most recently led the global commercial and securities division of the firm’s legal department.