"Fifty Shades of Grey" is a sexier, erotic version of "Twilight." Chuck Zlotnick/Universal Studios and Focus Features "Fifty Shades of Grey" — the best-selling erotic romance novel, box-office hit and international phenomenon — began as a fan fiction spin-off on the "Twilight" novels before it was published without an agent through a small, online writers community.

After reading the "Twilight" series, "Fifty Shades" author E.L. James started posting her own erotic take on the novels on Fanfiction.net, an online forum that allows fans to write stories based on the settings and characters in some of their favorite works.

"I just sat on my sofa and just read them and read them and read them," James told ABC back in 2012, referring to the books in the "Twilight" series. "I was inspired by ['Twilight' author] Stephenie Meyer ... she just kind of flipped this switch in my head." Shortly after reading the books, James says she sat down and decided to write a book of her own.

"It was one of tens of thousands, really hundreds of thousands, of stories written by this vast community of women who were inspired to write and share stories by 'Twilight,'" Anne Jamison, author of "Fic: Why Fanfiction is Taking Over the World," told CBC News.

Many readers deemed James' stories too provocative for Fanfiction.net, however, and she was forced to remove some of them from the site. "She took it down and thought, I’d always wanted to write. I’ve got a couple unpublished novels here," James' agent told the LA Times. "I will rewrite this thing, and create these iconic characters, Christian and Ana."

Christian Grey and Anastasia Steele, the two protagonists of "Fifty Shades," are basically Edward Cullen and Bella Swan of "Twilight."

Edward Cullen (Robert Pattinson) and Bella (Kristen Stewart) in the "Twilight" series. Summit Entertainment In "Fifty Shades," Christian Grey is a mysterious, jaw-droppingly handsome CEO. In "Twilight," Edward Cullen is a mysterious, jaw-droppingly handsome vampire.

In both stories, the heroine is understated, "pretty" but not "beautiful," and intimidated by the men's wealth and good looks. Both Bella and Ana are clumsy and routinely question what their male counterpart sees in them.

James went on to create her own website — 50shades.com — where she could post more of her writing. Her online serial, originally published under the title "Masters of the Universe," eventually led her to write "Fifty Shades of Grey," which James self-published through a small former writers community called The Writer's Coffee Shop in May 2011, according to Publishers Weekly. One year later, she had sold roughly 30,000 copies in e-book downloads.

A screenshot of the link to the first chapter of 'Masters of the Universe,' a fan fiction erotica book about an average girl named Bella Swan meeting the wealthy, handsome Edward Cullen. GalleyCat Literary agents soon took notice of the book's rising online popularity. “There was already a buzz about the trilogy in early 2012, appreciation for the books had gone viral,” James’s literary agent Valerie Hoskins told Vanity Fair last week. "All of the Big Six (five now) publishers in New York City were very keen to offer for it.”

In March 2012, James signed a 7-figure contract with Random House’s Vintage Books. The book sold 10 million copies in six weeks. By the end of 2012, sales hit 70 million copies worldwide.

The series' humble origins are surprising given its record-breaking success. Since its mainstream release in 2012, "Fifty Shades" has sold over 100 million copies worldwide and launched an entire genre known as "mommy porn." It has been translated into 52 different languages and the long-awaited film adaptation, which premiered on Valentines Day, raked in $94 million on its opening weekend — a Presidents' Day record.

Supporters of fan fiction have mixed feelings about the book's overwhelming success. Some feel that fan fiction is not supposed to be profitable, and that James betrayed the community and its values by signing a book deal with such a major publisher.

"It wasn't the first fan fiction to be published, by any means, but it was the first that was so big and so popular and got so much attention," Jamison told CBC.

Still, others are hopeful that James' success will set a precedent for writers of fan fiction to gain respect among the literary elite. Many publishers now scout potential clients through fan fiction sites.

"There were definitely editors that said they thought [fan] fic was over, which I think is funny in retrospect," Holly Root, a literary agent at Waxman Leavell in New York, told Vanity Fair. "That was 2012, and how many deals have there been since then?"