Morocco holds a lot of space in the imagination of writers, readers, and visitors. It’s where Yves Saint Laurent partied, where Winston Churchill hid out after the summit with F.D.R. in Casablanca, and where, incidentally, that classic Bogart movie was not filmed. Allen Ginsberg, Jack Kerouac, Tennessee Williams, and the Rolling Stones all passed through and most likely misbehaved.

In Tangier, William Burroughs wrote Naked Lunch in the Hotel el-Muniria, and Paul Bowles wrote The Sheltering Sky and an amazing short story, “A Distant Episode,” about an arrogant linguistics professor who runs afoul of a Berber tribe in the desert.

The Moroccan city of mystery and dark doings is also the setting for Christine Mangan’s debut novel, Tangerine, about two young women who reunite after an unusually close college roommate experience at Bennington that included a life-altering tragedy. It’s 1956, with the rumblings of Moroccan independence about to mark the end of Tangier as an international zone. The girls are wearing hose in the blistering heat. Alice is the English rose with a trust fund and a ne’er-do-well husband; Lucy is the former Vermont scholarship girl who shows up uninvited on Alice’s Tangier doorstep. She’s destined to shake things up, especially since Alice is almost housebound: the city has her paralyzed with ennui and fear.

The book has been a sensation from the moment it was sent to publishers, and when a colleague mentioned it and I started talking to the people involved, I got involved and couldn’t resist the story of Tangerine’s acquisition or the people behind it.

During a meet-and-greet at the Book Group, I chat with Elisabeth Weed, a partner, and, it turns out, the agent representing Tangerine. Like most literary agencies, the Book Group receives plenty of over-the-transom submissions, and Weed religiously checks the slush pile (not something at the top of most agents’ and editors’ to-do lists). “I must look at the list twice a week to see what’s there,” she tells me.

Weed devours thrillers, so the stage was set for her to notice Mangan’s pitch letter (it was terrific, Weed says) and the first 10 pages of her book. “After those 10 pages, I wanted more, and asked for the whole manuscript, which I devoured.”

Weed gave the manuscript to Dana Murphy, her former assistant and now an agent, as a second reader. She loved it, too.

Mangan had just moved to Dubai to teach at the university there. Working on the revision, Weed says, was crazy because of the time difference. There were many overnight calls as Weed and Mangan refined the manuscript and produced two drafts over four months. Tangerine is told from the alternating viewpoints of Alice and Lucy. The original story, Weed says, had three points of view: Lucy, Alice, and a policeman who dropped out by the time the manuscript was ready for its close-up.

Weed sent it out to 20 publishers and “had offers within 24 hours.” The winner, after an auction that was called for the day before the presidential election, was Zach Wagman at Ecco. Wagman has been at Ecco for two-plus years, he tells me over lunch at Augustine in the Financial District. (We both order wine—we’re bonding already.) Wagman came over to Ecco from Crown (he was at Random House for 11 years) when Denis Lehane moved from Morrow. Dan Halpern, Wagman says, wanted to expand the range of Ecco’s list; one area for growth was literary thrillers.

But back to Tangerine: Wagman had a relationship with Weed and says she called him to tell him about the book before she sent it out. He knew that she loved thrillers and was excited to rep one. But, he adds, “I asked for a head start that she wouldn’t give me.”

Since he’d recently moved to the suburbs, Wagman says, he was primed—all that reading time on the train. Like Weed, Wagman was smitten: “The writing was good; it was classy, cool, restrained, and I love books that make me think of old-fashioned midcentury noir, like Patricia Highsmith. It’s hard to do without feeling forced.”

And there was the special hook of Morocco, because—as you might or might not know—Ecco was created in Morocco, spawned from the litserary magazine Antaeus, which was founded in 1971 by Dan Halpern and, yes, Bowles. When I ask Halpern about the book, he is succinct: “Reading this submission, I lived again in the sweet air of ’60s Tangier. Ecco had to have Tangerine.”

Wagman emailed Weed to tell her that he was “immediately digging the book.” He asked who else had it at HarperCollins and she mentioned Jennifer Barth at Harper and Jessica Williams at Morrow.

There were preempt offers, but Weed wasn’t taking them, and Tangerine went to auction with Knopf and Riverhead in the mix. “We were working around the clock,” she says. “We talked to everybody!”

Wagman wrote to Weed with his vision for the book—a letter that she describes to me as a “love letter.” Between the Morocco connection with Ecco and Mangan herself (“She’s smart,” he tells me, “and has a degree in gothic literature, and had traveled to Tangier”), Wagman felt “the elements were all coming together.”

It was a two-round auction, with Tangerine going to HarperCollins. Mangan chose Ecco. The price tag is rumored to be near $1 million. How times have changed: in 2015, Halpern was quoted in the New York Times saying that Ecco “never paid more than $3,000 for a book for years.”

Wagman got the book on election day (he bought North American rights and audio), and, he says, his edit was “gentle, mostly for pacing.” He wanted to finish it quickly for a March 2018 pub. The sales department reported that booksellers and reps like to listen to books, so he had the audio done quickly as well and had it sent out.

Response to Tangerine has been swift and impressive. It’s been selected for the American Booksellers Association “Indies Introduce.” Mangan (who seemed young, shy, and sweet when I met her at her book lunch) has quit her job in Dubai and moved to Brooklyn and is going to Winter Institute. Film rights, via CAA, have gone for a hefty amount to George Clooney and Grant Heslov at Smokehouse Pictures, with Scarlett Johansson attached to star. And foreign sales have been impressive: Jenny Meyer has sold rights to date in 19 territories, including U.K. (Little, Brown), Germany (Blessing), Holland (Ambo Anthos), France (HarperCollins Noir), Italy (Piemme), Spain (Planeta), Brazil (HarperCollins Brasil), Sweden (Modernista), Israel (Matar), Poland (Marginesy), Czech Republic (Host), Hungary (Libri), Bulgaria (Prozoretz), Lithuania (Baltos Lankos), Serbia (Vulkan), Simplified Chinese (Citic), Complex Chinese (Faces), Korea (Monhakdongne), and Japan (Hayakawa).

All this excitement about Tangerine got me thinking: I spent a winter in Tangier years ago, but instead of hanging out with Bowles, I was with an Italian guy who played cards for money and drank arak with the men in the local seaside café while I read books in the American woman’s apartment of which one of them was caretaking. No one disappeared. Too bad—I might have had a story.