Former FBI general counsel James A. Baker has landed a role as deputy general counsel at Twitter Inc. amid the San Francisco-based social media company receiving heavy criticism from President Donald Trump.

Twitter's general counsel, Sean Edgett, announced in a tweet Monday night that Baker has joined the company's legal department. It is not clear where Baker will be based or when he starts his new role.

"Jim is committed to our core principles of an open internet and freedom of expression, and brings experience navigating complex, global issues with a principled approach," Edgett said in the tweet.