Dick Costolo is stepping down as CEO of Twitter, following months of questions about the company's performance under his leadership. Jack Dorsey, Twitter's cofounder, has been tapped as interim CEO.

Costolo, who was appointed CEO of Twitter in 2010 has been fending off questions about the company's disappointing user numbers and revenue growth ever since taking it public in November of 2013. Though Costolo didn't acknowledge those concerns in a call with investors today, his departure comes less than two months after a disappointing earnings report that was notably weak in both those areas.

Twitter shares rose about 7 percent in after-hours trading following the news, but quickly gave up much of those gains.

Though Twitter is a platform with over 300 million monthly active users, it has struggled to generate the sort of revenue that justifies its over $23 billion public market value. Costolo has had a notoriously difficult time managing investor expectations as result, with some prominent ones calling for his head.

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

Just two weeks ago, Costolo was singing a different tune, giving no indication of a potential exit in an interview with Re/Code's Kara Swisher. "I don't worry about that at all. The board and I are completely in sync. Believe me, I don't worry about that at all," he said of his job security. "I think you have to have thick skin to be the CEO of any company, but this one particularly. You have to be resilient and be mentally tough and focus on what you're going to focus on."

Welcome back, @jack !! https://t.co/3papmyUKg0

The suddenness of the transition came as a surprise. Costolo was scheduled to speak next Tuesday at a technology conference sponsored by Bloomberg.

Behind the scenes, however, the move was in the works for several months. "I started this dicussion with some of the board members at the end of last year," Costolo said during a call with investors today. "I personally felt the scrutiny of the company would intensify if i remained CEO, as the search process was ongoing. As such, I felt it would be a distraction for the company. Frankly, I didnt think it would be in anybody's interest to have that distraction."

Will Alden contributed to this report.

First full day as Twitter COO tomorrow. Task #1: undermine CEO, consolidate power.