NEW YORK — In an electric transaction that came together late Wednesday, Warner Bros. purchased the new Nicholas Sparks novel, “Message in a Bottle,” for $1.5 million, sources said. The film will be produced by Denise Di Novi.

WB took the property off the table just as studios were mobilizing other bids, and hours after the studio and Di Novi received the first 127 pages of the still-incomplete novel along with a plot outline.

The book is Sparks’ follow-up to bestseller “The Notebook,” the story of a man reading back his diary to his wife in a nursing home, which is now in development at New Line, being scripted by “Shine” Oscar nominee Jan Sardi.

Much like “The Notebook,” “Message in a Bottle” is a reflective look back at true love. A female journalist walking on the beach stumbles on a bottle in the sand at Cape Cod containing a love letter from a man to his wife. She falls in love with the letter-writer and sets out on a search for him.

UTA agents Richard Green and Howard Sanders made the sale in conjunction with Sparks’ literary agent, Theresa Park of the Sanford J. Greenburger Agency. Sparks’ first novel, which has been on the bestseller list for 19 weeks, was published by Warner Books. The same publisher will get a 30-day exclusive first look for publishing rights. If no deal is struck by then, Park will submit it to other publishers.

Park said they opted to go with the partial for fear it would leak to the film community. The novel was sent to studios Wednesday morning, and the WB deal was sealed at 7 p.m.

“The key is that Nicholas is such a fan of love letters,” said Park. “Because the woman falls for the guy through the letters, they had to be just right. Nobody writes a love letter like Nicholas Sparks.”

Reached late Wednesday, Sparks seemed surprised studios sparked so quickly to the material. “It took me a long time to think of this story, because I wanted a good follow-up to ‘The Notebook,’ ” Sparks said. “While lying in bed, I had this image of someone on a beach, and thought about them finding a bottle and undertaking a quest to find the person who wrote the letter.”

Follow @Variety on Twitter for breaking news, reviews and more