In the wake of the US supreme court decision on gay marriage, one might think that Americans now feel comfortable with homosexuality.

I have evidence to the contrary.

When my thriller My Name is N came out this month in the US, it got very positive reviews and even led the book section in Entertainment Weekly. But then the reviews on Amazon starting pouring in:

The main character ... gets his kicks lusting at other young male muscular torsos during his time in the Diego Garcia gym. Frankly like the kids in college now with all their ‘cautions’ about ‘sensitive material ahead’ I would have like[d] that caution.

Another, from a former US marine:

I guess I don’t like hidden agendas without disclosure, particularly if is it trying to mainstream and advertise a LGBT lifestyle. At least disclose that information so I can make up my own mind before wasting time and money.

It took me a while to figure out what was actually being said there. These male readers don’t object to a bisexual male thriller hero per se. But they wanted a warning.

The cover of My Name is N. Photograph: Supplied

The book doesn’t give them one. Its front cover shows a dark and dangerous man wielding a machine gun. The back cover has a photo of me in my flight suit, walking away from a Swedish air force helicopter I’ve just landed (as well as a writer, I am a lieutenant colonel). It looks like the standard thriller – cool, tough and very masculine. No sign of bisexuality. Nothing to suggest that the book’s protagonist, turning his back on his many female conquests, will fall in love with a man and do anything to save his life.

I think these male readers feel tricked, and Amazon gives them a place to vent their frustration with the zeitgeist. “Be forewarned,” says another negative review, that “a homosexual love story is a central element. I know it’s all the PC rage to get behind that stuff, but frankly, I have less than zero interest in reading about it.”

A few years back, a US literary agent considered making a first attempt to sell My Name Is N to American publishers. (The book is titled The Swede in the US.) But the agent hesitated, saying the mainstream crime fiction market couldn’t stomach a gay male hero. She suggested that I rewrite the book to make the protagonist straight.

I thought seriously about it. But in the end, I decided to be true to the man I based my protagonist on. Hugh Swaney was a legendary homicide detective on the US west coast. I’d spent a week interviewing him, taking notes on his life and work as he was dying of Aids. He was the toughest man I’ve ever come across (including many in the special operations community I’ve met over the course of my military career).

Hugh had a wife and kids and led a seemingly conventional life. But on weekends, he’d escape to San Francisco to meet men. The tension was destroying him. Eventually he reached the point of volunteering for the most dangerous assignments, and when he was the first through the door to face armed madmen, his coworkers thought he was incredibly brave. In fact, he simply wanted to die. Finally, a police psychologist he confided in told him he was gay – and Hugh eventually found a degree of happiness with a male partner.

As a cop, Hugh was a brilliant interrogator. Of the 50 homicides he investigated, 49 led to convictions. Having lived with his own deception, experiencing the darker facets of human nature, he knew how to ask the small and seemingly innocent questions that could make a suspected killer crack.

This was the character I wanted in my thriller. I wasn’t looking to score political points. I wanted readers to be caught up in a story of deception and double lives. But in tangling with the complexity of real human lives, as a writer it seems I’ve struck a nerve.

There’s a memorable scene in Skyfall where none other than James Bond suggests to his gay nemesis that he might have had sex with men. (Daniel Craig delivers his line – “What makes you think this is my first time?” – as Javier Bardem caresses Craig’s thighs.) I thought that was a cultural moment, evidence of a real shift. A man can be tough, sexy and bi.

But as the Amazon reviews show, more than a few American men believe that a gay protagonist belongs on a special gay bookshelf.

It will take more than a supreme court ruling to change their minds.