Twitter’s top lawyer, Alexander Macgillivray, is leaving the company. He announced his decision on Twitter early on Friday, but gave no reason for his departure.

During his tenure as general counsel, Twitter distinguished itself as an assertive defender of its users’ privacy and freedom of speech—a particularly notable stance as Twitter evolved into one of the top outlets for breaking news across the world.

“As for me, it has been my privilege to work and fight on behalf of great companies and their users over the last decade,” he wrote on his blog. “A privilege and a lot of work.”

As government requests for data increase, many technology companies have come under fire for allegedly providing user information without notification or proper safeguards. (Most of these companies insist they treat user data with care.) When leaked documents from the NSA purported to show that nine Internet companies were providing intelligence and law enforcement agencies broad access to user data, Twitter was conspicuously absent from that list. The Electronic Frontier Foundation awards Twitter six of six stars in its “Who Has Your Back” survey of Internet-service privacy practices.

Twitter routinely informs its users when government bodies request their data, unless forbidden to do so by law or court order, and it has fought for its users in court, although it hasn’t always won. It protested a subpoena in which Massachusetts prosecutors sought Twitter data from members of the Occupy movement, although a judge eventually ordered Twitter to hand over the data. It lost a similar court fight against the Department of Justice in an attempt to protect the privacy of Wikileaks supporters.

“You don’t want business interests affecting judgment about content,” Macgillivray told the New York Times in 2012. “That is against corporate interests. It’s against the trust your users have in your service.”

As AllThingsD notes, Macgillivray’s departure does come at an unusual time, as Twitter is moving toward preparing and filing its initial public offering. As general counsel, Macgillivray would have been deeply involved in the process of prepping the company and its documentation for presentation to the SEC.

Vijaya Gadde, a legal director at Twitter during Macgillivray’s tenure, will be replacing Macgillivray. Gadde has been managing Twitter’s corporate and international legal work and has known Macgillivray for fourteen years.

Macgillivray joined the company in July of 2009 after working as deputy general counsel for products and intellectual property at Google. It is unclear where Macgillivray is headed next.

“I’m looking forward to engaging my various Internet passions from new and different perspectives, seeing friends and family without distraction, and just goofing off a bit,” he wrote. “We should all do more of that.”

Photo via Flickr user Joi