As Twitter moves closer to preparing for its initial public offering, the social media giant’s top legal defender is stepping down after serving four years as the company’s general counsel.

Alexander Macgillivray, Twitter’s general counsel and chief navigator of its complex digital First Amendment issues, is departing the company and has been replaced by Vijaya Gadde, who previously served as Twitter’s legal director for corporate and international issues.

Some sources say that Macgillivray’s tense relationship with Twitter CEO Dick Costolo could have contributed to his decision to leave. Macgillivray said he will remain close to Twitter during the management transition, and plans to “dial back” his day-to-day involvement with Twitter.

“I’ll continue to support the company and its great people by staying on as an advisor for the legal, trust & safety, corporate development and public policy teams,” Macgillivray wrote in a personal blog post. “I continue to care deeply about Twitter, the folks who work at Twitter and our tremendous users, so I’ll remain close to all three.”

Macgillivray, a nine-year legal veteran at Google, has spent more and more time embroiled in legal issues surrounding free speech. On several occasions in recent years, Twitter has gone to court to defend user rights when it did not have to do so – such as in the case of Occupy Wall Street protestor Malcolm Harris – All Things D reported.

The timing of the move is considered unusual given Twitter’s long-anticipated IPO, which is expected to come in early 2014.

Although Twitter has not confirmed its IPO plans, in early August, the company posted a job opening on LinkedIn for a financial reporting manager. According to USA Today, Twitter’s job opening listed the following duties: “Responsible for preparation of monthly reporting materials, quarterly/annual financial statements and Form S-1 when we are ready to go public.”

Shortly after USA Today’s report, the job posting was swiftly pulled. According to media reports, Twitter management has not given a reason for Macgillivray’s departure.

Editor in Chief

Erin E. Harrison

Erin E. Harrison is the Editor in Chief of InsideCounsel magazine. Harrison’s professional background includes extensive expertise in both print and online media, highlighted by...