Best-selling Camden author Tess Gerritsen's new book, "The Shape of Night," is being released Tuesday.

Camden author Tess Gerritsen is best known for suspenseful medical thrillers and police procedurals that have been adapted into a long-running television drama, Rizzoli & Isles.

But this fall, she’s spreading her wings with “The Shape of Night,” a mystery about a cookbook writer who rents an old house on the coast of Maine that’s occupied by the ghost of a sexy 19th-century sea captain.

Gerritsen, 66, had a lot of fun with this one, she said in an interview in her own — presumably — ghost-free seaside home.

“It felt like a little summer vacation, in a way, because I’m getting away from classic crime novels. I’m getting away from my detectives,” she said. “I wanted to have somebody who was not a cop — more like a Jessica Fletcher type, who falls into this murder mystery.”

But there’s a lot of daylight between the sunny “Murder She Wrote” protagonist and Ava, the writer and tenant of Brodie’s Watch who, we learn, is guarding a lot of secrets herself.

“She’s a troubled woman,” Gerritsen said. “That’s the other thing I was working with — the devastating power of shame. And how, when you feel guilty about something, something that you did that ended up horribly wrong, where does that go? How does that pop out at various parts of your life? And that’s maybe where the ghost came in.”

The novel began as a never-produced screenplay that she had written 35 or so years ago, about a woman who fell in love with a ghost, which had been inspired by her love of the 1960s television show, “The Ghost and Mrs. Muir.”

“That screenplay just sort of sat with a pile of papers. I pulled it out and thought, well, the kernel of this story still intrigues me. What if a ghost is a perfect lover? And what if I just did a retelling of the ‘Ghost & Mrs. Muir, but with a dark and sexy twist to it? That’s how it all came about. It was something that had been simmering in the back of my head for decades,” Gerritsen said.

The book, compulsively readable, was worth the wait. It has twists, turns, suspense, old-fashioned recipes and small-town dynamics that may feel familiar to lots of Mainers, though hopefully the ghost and murder elements will not.

“It just felt so natural to put it on the coast of Maine,” Gerritsen said, adding that she thinks there’s a simple reason why so many mysteries and spooky books are set here. “I think it’s all Stephen King’s fault. He established this as a scary state, even though we all know it’s not … now we’re branded. The state of Maine is branded as a scary state. Which is not necessarily a bad thing.”

After “The Shape of Night,” available beginning Tuesday, the author is working on a couple other projects — neither of which is a medical thriller. She and her son, Lincolnville filmmaker Josh Gerritsen, are working on a feature documentary about pigs, which started when she wondered why pork is forbidden for Jews and Muslims. Over the course of making it, they have gone on a pig hunt in Texas and talked to anthropologists in Egypt, among other adventures, and are hoping to have the rough cut done this fall.

Gerritsen is also beginning to write another standalone novel that’s set in midcoast Maine, focusing on the fact that a lot of intelligent people choose to retire here. In fact, when her family first moved to Camden, they had a retired CIA agent down the street and a retired agent from the wartime Office of Strategic Services right next door.

“What does that mean, that you have a nest, a town, of retired spies?” she said.

Wherever the answer takes her, she is delighted to continue to branch out. She hopes “The Shape of Night,” which adds romance and eroticism to the suspense she’s better known for, will be as much fun to read as it was to write.

“Mostly I want [readers] to have a good time,” she said.

Gerritsen will hold talk and signing events at 2 p.m. on Saturday, Oct. 19, at the Owl & Turtle Bookshop at 33 Bay View St. in Camden, and at 6 p.m. on Wednesday, Dec. 4, at Bangor Public Library at 145 Harlow St. in Bangor.