SAN FRANCISCO — A former PayPal Inc. executive is suing the company for defamation, claiming PayPal wrongly implied he was fired after attacking a colleague on Twitter.

Rakesh Agrawal, PayPal’s former director of strategy, took to the micro-blogging site in May 2014 to launch an obscenity filled and sometimes incoherent rant. The early morning tweets, which were quickly deleted, included messages calling PayPal’s global brand and communications officer a “piece of shit” and a “useless middle manager,” according to Business Insider. That afternoon, PayPal tweeted: “Rakesh Agrawal is no longer with the company. Treat everyone with respect. No excuses. PayPal has zero tolerance.”