Alex Macgillivray, who has spent the last four years as Twitter's general counsel, announced that he will be stepping down as the social blogging Website prepares to go public in 2014.

Macgillivray will be replaced by Vijaya Gadde, who has been managing Twitter's corporate and international legal work since July 2011. Before Gadde joined Twitter, she served as a senior director in the legal department of computer security company Juniper Networks. Prior to Twitter, Gadde was formerly an associate at the law firm Wilson Sonsini Goodrich & Rosati, where Macgillivray was also formerly an attorney.

In his Twitter blog post, Macgillivray said he'll “continue to support the company by staying on as an advisor for the legal, trust & safety, corporate development and public policy teams.” He gave no reason for his departure.

Macgillivray, who assumed the top legal position at Twitter in September 2009, will be remembered for fending off legal issues faced by Twitter users over their rights to free speech. Over the past few years, Twitter has been blocked in countries like Egypt, Iran, and Pakistan, as a result of anti-government protests and demonstrations being arranged through social networking sites.