Keith Rabois, the COO of mobile payments firm Square, resigned following the threat of a sexual harassment lawsuit from another employee, the company has said in a statement.

Rabois unexpectedly resigned at the end of last week with no reason given by him or Square. Subsequently, the company issued a statement in which it has revealed information about the lawsuit.

The company received the allegations two weeks ago and launched an investigation, it said. “While we have not found evidence to support any claims, Keith exercised poor judgement that ultimately undermined his ability to remain an effective leader at Square,” said the statement.

The news of the sexual-harassment claim was first reported in the Wall Street Journal.

Rabois issued a statement on his own blog in which he denied the allegations and said the relationship was consensual.

He said in the blog that the relationship was with someone he met through mutual friends in 2010. He recommended the person apply for a job at Square. The person was subsequently employed, although not reporting to Rabois.

He confirmed the lawsuit and said it would allege that the relationship was not consensual.

“I was told that only a payment of millions of dollars would make this go away, and my career, my reputation, and my livelihood will be threated if Square and I don’t pay up,” he wrote. “While I have certainly made mistakes, this threat feels like a shakedown, and I will defend myself to the full extent of the law.”