(AP Photo/Richard Drew, File)

Facebook's Elliot Schrage said he is stepping down after a decade at the company, a rare departure among the senior ranks at the social network.

Schrage, who oversaw a broad portfolio including marketing, communications and public policy, helped craft Facebook's response to recent crises, including Russian meddling around the U.S. presidential election and the Cambridge Analytica data privacy scandal, which resulted in two days of heated Congressional hearings for chief executive Mark Zuckerberg.

In his post, Schrage said he had been talking with Zuckerberg and Chief Operating Officer Sheryl Sandberg about moving on for some time. "After more than a decade at Facebook, I've decided it’s time to start a new chapter in my life. Leading policy and communications for hyper growth technology companies is a joy — but it's also intense and leaves little room for much else," he wrote. "Mark, Sheryl and I have been discussing this for a while."

Schrage, who said that he would lead the search for his replacement, did not reference the recent controversies directly. He referred to risks that Facebook has taken over the years that have landed the company in trouble. "Our company’s history is filled with ‘real risks taken’ — sometimes controversially but always thoughtfully and with care. Yes, there really were ‘risks’ to better help people connect, share and build community," he wrote.

Schrage's role had been destabilized for several months since the arrival last year of Rachel Whetstone, a former colleague of Schrage at Google, according to people familiar with the matter. Schrage played down the possibility of his departure to his team earlier this year.

Whetstone will manage some of his portfolio, according to a person familiar with the company's thinking. Schrage will stay on as an advisor after his replacement is hired.

Zuckerberg hired Schrage away from Google in 2008. During his tenure at Facebook, Schrage was part of the company’s explosive growth from a social network with 100 million mostly millennial users to a global company that has more than one third of the world’s population logging in monthly.

He is well-liked by colleagues and known as a detailed and big-picture thinker who can painstakingly consider every aspect of a crisis and is protective of people who report to him. Yet Facebook's crises have grown in magnitude over the last two years.

As Facebook has become a major player in elections and news, critics and insiders have said the company was unprepared for the threats that emerged during the 2016 presidential election, including false political news that spread virally and the exploitation of its platform by Russian operatives.

Schrage advised Zuckerberg not to criticize Donald Trump directly as as candidate when he made inflammatory comments against immigrants during the campaign, according to three former executives. In the days after the election, Schrage dismissed any impact from fake news on Facebook on the election results, according to BuzzFeed. Zuckerberg echoed that stance in nearly identical language but later apologized.

Though the Russia and Cambridge Analytica scandals have been Schrage's biggest tests, he has managed many battles along the way. Facebook’s introduction of automatic facial recognition in people’s photos, fights with third party developers accessing user data and legal settlements over privacy settings and the use of people’s images in advertisements among them.

In response to the controversies he launched a blog called Hard Questions, in which Facebook executives and outside researchers explain their decision-making in certain areas. Schrage had described the blog as an effort toward greater transparency.

Whetstone joined Facebook last summer to become vice president for communications for properties outside the core social network, WhatsApp, Instagram and Messenger, but has quickly ascended to manage policy issues across the company.

Schrage's resignation follows months of shakeups and a corporate reorganization in the wake of the Cambridge Analytica and Russia controversies. Jan Koum, a board member and founder of WhatsApp, recently left the company after years of controversies with management over data privacy and the direction of WhatsApp. But Zuckerberg's inner circle has been largely loyal throughout Facebook's history.