Dick Costolo is stepping down as the CEO of Twitter. He made the announcement Thursday on Twitter.

Jack Dorsey, co-founder of the social-media giant, will serve as interim CEO effective July 1.

The move surprised both Wall Street and Silicon Valley because both Costolo and his supporters within the company had shaken off long-held criticism that he was responsible for the company underperforming.

In a conference call with reporters after Costolo’s announcement, Dorsey made clear that the company isn’t shifting its strategic focus and that Costolo left of his own accord. “This transition is not the result of anything more than Dick deciding to move on from his role as CEO,” he said.

Shares of Twitter stock rose 8% in after-hours trading Thursday.

“I am tremendously proud of the Twitter team and all that the team has accomplished together during my six years with the company,” said Costolo in a statement. “We have great leaders who work well together and a clear strategy that informs our objectives and priorities.”

Twitter management had come under fire for sluggish growth while competitors in the social-media sector including Facebook grew larger and progressed faster on monetizing their user base.

Twitter’s monthly user base will grow just 14.1% this year, slowing from more than 30% two years ago, according to eMarketer. Twitter accounted for less than 1% of the $145 billion digital advertising worldwide in 2014 while Facebook approached 8% over the same period.

Costolo, 51, moved from COO to CEO at Twitter in 2010, succeeding co-founder Evan Williams. He joined the company the previous year after selling a startup he founded, Feedburner, to Google in 2007.

In his time at Twitter, Costolo presided over a period of enormous growth for both the user base, now at 284 million worldwide, and the company itself, which tripled in size. But over the past year, Costolo was unable to quiet the din of investors calling for better oversight of the company in order to realize its full potential.

Most recently, venture capitalist Chris Sacca — an early investor in Twitter — had gone public with an extensive critique of the company’s weaknesses, though he stopped short of calling for Costolo’s resignation.

While he oversees Twitter, Dorsey will continue as CEO of electronic-payment company Square. But he is not expected to be a long-term consideration for the top job at Twitter, which will open up one of the most high-profile posts in Silicon Valley.

While the job will attract big names from outside the company, Twitter has a few high-ranking execs that will likely throw their hats in the ring: chief financial officer Anthony Noto and president of global revenue Adam Bain.

In a conference call with reporters after Costolo, announcement, Dorsey gave some sense of what he is looking for in a new CEO: “We’re looking for someone who uses and loves the product in every single way.”

“The future belongs to Twitter thanks in large part to Dick Costolo’s dedication and vision,” said Dorsey in a statement. “Dick has put a world-class team in place and created a great foundation from which Twitter can continue to change the world and grow.”

Costolo’s exit may renew speculation that Twitter is an acquisition target, with Google most recently being bandied about as a potential suitor.