A Stratford, New Zealand man was cleared of the accusation that he raped his ex-wife in "the most extraordinary" rape trial case in town, rivalling scenes from the popular erotic book "Fifty Shades of Grey."

The unnamed man was facing trial by jury on two counts of sexual violation by rape and four counts of sexual violation by unlawful sexual connection. He was acquitted of all the charges by Judge Allan Roberts in the New Plymouth District Court on Monday.

The charges originated from two sexual encounters between the ex-couple in 2012. They had been married for 15 years and had one child when they broke up. They kept in contact, however.

As reported by Fairfax NZ News, the man bought a new phone and did not tell his former wife about it. He started to text her, and when she replied to ask about his name, he just said, "Anyone you want me to be."

He pretended to be a 20-year-old Stratford man that he had met briefly once, and he and his wife started regular conversations by text. Their chats became highly sexual in nature, and had eventually led to a planned rendezvous in her home.

He told her he was nervous and did not want to show his face so he wore a balaclava and sunglasses and blindfolded her when he came to visit on October 26.

He was silent during their meeting, communicating with her only with hand gestures. The two went straight to her bedroom to have sex. The man noted that a copy of the "Fifty Shades of Grey" book and another tome with the title "The Diary of a Submissive: A Modern True Tale of Sexual Awakening" was found next to her bed.

He allegedly left the woman tied to the bed when he left the house.

The woman said she believed she was having sex with a 20-year-old man.

"While the victim found the sexual encounter exciting, she was disappointed she did not get to see [the man] after it had finished," the summary of facts reads.

On November 4, the man visited her again for another sexual encounter. But when he left her blindfolded and ran away, she followed him. He kept running even after she called him back, prompting her suspicion. She told a friend what happened, and they called the police.

Defence lawyer Paul Keegan called the case "the most bizarre and complex case that I've ever seen in 15 years." His client maintained in the case that his former wife always knew that it was him or at least thought that it might be him.