Note: This is an updated version of a previous story.
FORTUNE — Keith Rabois, the No. 2 executive at Square, the fast growing mobile payments startup, resigned from the company amid sexual harassment accusations made by an employee with whom he had an intimate relationship.
In a blog post, Rabois said that a New York-based attorney last week threatened him and Square with a lawsuit that would allege he sexually harassed the employee unless Rabois and Square made a “payment of millions of dollars.” Rabois admitted that he had a sexual relationship with the employee, but said that the relationship was consensual. He wrote that he resigned so that his “colleagues could continue to do great work without the distraction that a lawsuit would most certainly bring.”
In a statement, Ricardo Reyes, a Square spokesman said: “The first we heard of any of these allegations was when we received the threat of a lawsuit two weeks ago. We took these allegations very seriously and we immediately launched a full investigation to ascertain the facts. While we have not found evidence to support any claims, Keith exercised poor judgment that ultimately undermined his ability to remain an effective leader at Square. We accepted his resignation.”
In a statement Square founder and CEO Jack Dorsey credited Rabois with helping to lead the company and said “we wish him well in his next opportunity.”
In the post, Rabois said that he began a relationship with the unnamed employee in 2010, before the person worked at Square. Several months into the relationship, Rabois encouraged the person to apply for a job at Square
“He went through the interview process and was ultimately hired,”Rabois wrote. “I had no impact on his potential success at the company. At no point did he ever report directly to me, and I have seen his work product less than a handful of times.”
Rabois also wrote: “But let me be unequivocal with the facts: (1) The relationship was welcome. (2) Square did not know of the relationship before a lawsuit was threatened; it came as a complete surprise to the company. (3) He never received nor was denied any reward or benefits based on our relationship. And (4), I did not do the horrendous things I am told I may be accused of. While I have certainly made mistakes, this threat feels like a shakedown, and I will defend myself to the full extent of the law.”
Square said it has retained Richard Curiale, a San Francisco attorney, to handle the matter.
Rabois’ departure comes at a time of dramatic expansion at the San Francisco-based startup, one of the leaders in the mobile payments area.
In November, Square raised $200 million in a financing round that valued the company at $3.25 billion. The financing followed a broad partnership between Square and Starbucks
, which Dorsey discussed with Fortune in August.
Rabois had previously held executive positions at PayPal
and Slide, which was acquired by Google