John C. Sheldon and Gayle Lynds met on Facebook, which not only resulted in them getting married but also collaborating on a story in “A Study in Sherlock: Stories Inspired by the Holmes Canon.”

The book ($15 in trade paperback from Bantam Books) was edited by Laurie R. King, author of “The Beekeeper’s Apprentice” and other books featuring Mary Russell and Sherlock Holmes, and Leslie S. Klinger, editor of “The New Annotated Sherlock Holmes.” The stories are by such noted authors as Dana Stabenow, author of the best-selling Alaska-based Kate Shugak series, and Edgar Award winners Thomas Perry and Jan Burke.

Lynds is the author of nine spy thrillers published by St. Martin’s Press. Her latest book, “The Book of Spies,” kicks off a series featuring the characters Judd Ryder and Eva Blake in a search for Ivan the Terrible’s Library of Gold.

Although originally from New Jersey, Sheldon took a job as a prosecutor in Franklin County so he could be close to the skiing at Sugarloaf. After working as a prosecutor, he went into private practice in Farmington and became a district court judge. He now works as a mediator and arbiter, and writes for legal journals.

Sheldon and Lynds are collaborating on another story, while Lynds is writing her next novel. 

Q: How did you get selected for this book?

A: LYNDS: I often receive invitations to be in anthologies. Laurie King and Les Klinger got in touch with me and asked if I would participate in this wonderful anthology, and I was on a deadline, so there was no way I could do it myself.

John is a great writer. He does legal essays and adds these scenes to enrich his work. So I said to John, “Would you like to do this with me, only you are going to have to do most of the work?”

SHELDON: She went on with her manuscript, and I sort of stumbled around trying to write fiction. I used the idea of a Maine judge because that is my basic background, which was helpful. So I worked like I did when I was a student in college and didn’t know the answer.

I would come up with plot ideas, and we would talk about it, and she would say, “this would never work” and that “you need less dialogue and more action,” so I had them driving around through Lewiston to have more action.

I would go on the computer and work on this for four or five months, and when I was done I got something like three and a half cents an hour. 

Q: How did you two meet and end up in Maine?

A: LYNDS: Oh, that is too long a story.

SHELDON: I’ll take that one. I got an email one day from Facebook that Gayle Lynds wants to be your friend, so I went to Facebook and responded, “Who are you, and why do you want to be my friend?” And then she responded to me and said, “My publisher wants me to expand my readership and reach out to more people. I won’t bother you anymore.” I had never heard of Gayle Lynds, but I did some research and found out she had written all of these best-selling books, so I said, “I want you to bother me some more.”

LYNDS: When he replied, he inadvertently posted it on Facebook, so all 1,500 of my friends and all eight of John’s friends could see it. So we got a comment from John Lovell, who was John’s editor at the Maine Bar Journal, and he said, “John Sheldon is a first-rate writer.”  

SHELDON: We owe it to him that we got together. In March of 2010 she came to visit — which is the wrong time to see Maine, I suppose — but we went to Acadia, which is austere in March but still colossal. Then I went to visit her in Santa Barbara, and then she came up here last summer, and this is her first winter in Maine.

The reason we settled in Maine is that I have this backhoe that I will not part with, and it is not up to the standards of Santa Barbara. 

Q: Gayle, you worked as an intelligence officer. Can you tell us what you did?

A: LYNDS: I was never an intelligence officer. I was an editor at a think tank that handled a lot of government documents up to the top-secret level. It was a wonderful experience, and I had a vast array of things cross my desk, including that they had plans for missiles on the hills behind Santa Barbara — no missiles, just plans. There were all these shadowy people who came through the office, and I never knew their real names. That  was my introduction, and it marinated with the passage of time. 

Q: Did you have any interest in doing spy novels before you worked at the think tank?

A: LYNDS: I had no idea of that. I had a degree in journalism, and I worked as a reporter before I went to the think tank. I knew I wanted to write fiction, and my three years at the think tank were such an eye opener.

Every time I left my office I had to punch in my code, and if I left any paper on my desk that might have “classified” stamped on them, I could get in trouble. Everybody there was classified, but they should see only what they had a need to know.

So with that study of how the U.S. government works, I naturally turned to international politics, which ends up being spy fiction. 

Q: You have written nine spy novels, but just launched a series with “The Book of Spies.” Why so long?

A: LYNDS: I waited so long because that was the way my mind works, and we can train our mind. I love stand-alone novels. In writing stand-alone novels, you get to create new characters each time, but that is also the downside: You have to create new characters each time. A lot of my readers were asking me to bring this character or that one back, and I couldn’t do it. Their story was done. But with a series, you can take a longer story arc and carry it from book to book. In ways, that is more challenging, but my readers asked for it. 

Q: Is John’s work scheduled for publication yet?

A: SHELDON: Not in fiction. I am working on a book involving the same character, in name anyway, who is a judge in Franklin County, which is where I worked as a prosecutor.

LYNDS: And he gave a talk at the winter Bar Association meeting. One of the reasons we are living here is that he still works as a mediator and arbiter, and my career is much more portable. And my children live on the East Coast. 

Q: Do you think you might collaborate again?

A: LYNDS: I’ve been invited to be in another anthology, this one on the Cold War, and since I thought the first one was such a success, we have signed on to do another one.

SHELDON: And we might collaborate on something longer than a short story, but right now I’m churning away on the Cold War Story. 

Q: Is there anything you’d like to say that we haven’t covered?

A: LYNDS: I would like to say how much I love Maine. Not just the scenery, but the people are so nice. They don’t hog the street and they say “excuse me,” and there are really no boundaries.

SHELDON: And after another January in Maine, I miss Santa Barbara. 

Tom Atwell is a freelance writer who lives in Cape Elizabeth.