Emotionally withdrawn Joel Barish and the free spirit Clementine Kruczynski strike up a relationship on a Long Island Rail Road train. They drawn to each other, despite their radically different personalities. Although they apparently do not realize it at the time, Joel and Clementine are in fact former lovers, now separated after having spent two years together. We learn that after a nasty fight, Clementine hired a New York firm – Lacuna, Inc. – to erase all memories of their relationship. Upon discovering this, Joel was devastated and decided to undergo the procedure himself. However, while unconscious and having these same memories erased, he rebelled, realizing he wanted to hold on to his memories of Clementine after all. Much of the film takes place in Joel's mind as he struggles to preserve at least some memory of his love for Clementine. We watch their love and courtship go in reverse. The memories are slowly erased while Joel tries his best to resist the procedure and hide inside his own mind. In separate and related story arcs, the employees of Lacuna are revealed to be more than peripheral characters in scenes which further demonstrate the harm caused by the memory-altering procedure. Mary (Dunst) turns out to have had an affair with the married doctor who heads the company (Wilkinson), a relationship which she agreed to have erased from her memory when it was discovered by his wife. Once she learns of this, she steals the company's records and sends them to all of its clients. Patrick (Wood), lonely and socially inept, became fixated on Clementine and uses the personal mementos that Joel gave to Lacuna, as part of the procedure, in order to seduce Clementine. These romantic entanglements turn out to have a critical effect on the main story-line of Joel and Clementine's relationship.