Melvin Rabin, the psychologist accused of having sex with a patient, has surrendered his license and acknowledged in his resignation letter that he failed to maintain professional boundaries and put his patient “at risk of harm.’’

Mel Rabin — Linkedin

The Board of Registration of Psychologists accepted the license surrender Friday, more than two years after the patient, Lisa Grover, filed her complaint. State law and professional ethics prohibit psychotherapists from having romantic or sexual relationships with patients.

Rabin’s resignation was dated Tuesday, the day after the Globe reported on Grover’s allegations that Rabin lured her into a relationship that started with flirtatious e-mails, progressed to hugs and kisses, and eventually led to sex on his office couch. Grover, who was seeking to recover from childhood sexual abuse, said the relationship with Rabin was emotionally devastating.