The acclaimed mystery writer Joseph Hansen, 81, who died of heart and lung ailments Nov. 24 at his home in Laguna Beach, Calif., added a novel twist to the genre when he made his sleuthing hero a homosexual.
Mr. Hansen had spent years writing poetry and gay-themed fiction under a pseudonym when he decided to enter the mainstream detective market with "Fadeout" (1970), which introduced his savvy insurance investigator/protagonist Dave Brandstetter.
Hansen wanted to pen a "compelling whodunit, but I also wanted to right some wrongs" regarding homosexual characters.
Unfailingly tenacious in the fictional tradition of Philip Marlowe, Sam Spade and Mike Hammer, Brandstetter was a man of decency on the deceptively sunny streets of Southern California. And when the day was over, he preferred the company of men.
The Brandstetter books first appeared at a peak early moment in the gay liberation movement, a year after the Stonewall Inn riots in New York's Greenwich Village. Along with Tennessee Williams and Christopher Isherwood, Mr. Hansen became one of the few popular and identifiable gay literary voices publishing in the United States at the time.
He was almost alone in the realm of mystery stories.
"Homosexuals have commonly been treated shabbily in detective fiction -- vilified, pitied, at best patronized," Mr. Hansen told "St. James Guide to Crime & Mystery Writers." "This was neither fair nor honest.
"When I sat down to write 'Fadeout' in 1967, I wanted to write a good, compelling whodunit, but I also wanted to right some wrongs," he said. "Almost all the folksay about homosexuals is false. So I had some fun turning clichés and stereotypes on their heads in that book. It was easy."
It was publishing the story that was hard. It took nearly three years to find a publishing house that would accept an unapologetically gay sleuth without turning the story into a sensationalized account of his homosexuality. Pointedly, the series finishes with Brandstetter having the same lover for 22 years while his father has swept through nine marriages.
When "Fadeout" appeared, its author was praised by reviewers for making Brandstetter foremost an intriguing character. He did not turn his stories into political manifestos about gay rights -- "The Subject," as he called it. Instead, he focused on a well-paced mystery involving a man who happens to have an eye for men.
Brandstetter was Mr. Hansen's sleuth in a dozen novels, the last of which was "A Country of Old Men" (1991), which shows his weary hero in his late sixties in a post-AIDS world.
In that book, Brandstetter stirs the ire of his longtime lover with his reluctance to retire and give up cigarettes. The boyfriend is also mad that the detective doesn't appreciate the avocado omelet he has whipped up.
On the positive side, Brandstetter turns down a comely young man's advances with the reply, "I'm flattered . . . but my sleeping partner wouldn't like it."
Mr. Hansen, the son of a shoe shop operator, was born July 19, 1923, in Aberdeen, S.D. As his family struggled during the Depression, he was raised in Minneapolis and Altadena, Calif.
His early poetry was accepted by the New Yorker and other august magazines. He co-founded the gay publication Tangents in 1965, produced the radio program "Homosexuality Today" in Los Angeles in 1969 and helped plan the first gay pride parade in Hollywood in 1970.
For years, Mr. Hansen wrote books under the name James Colton, including, "Lost on Twilight Road" (1964); "Strange Marriage" (1965); and "Known Homosexual" (1968), later revised and republished as "Pretty Boy Dead," the title Mr. Hansen originally wanted.
Long an admirer of detective fiction, he wrote "Fadeout" as an antidote to what he considered the crude literary style of Mickey Spillane but still featured a man as open about his desires as Spillane's Mike Hammer.
Eventually Joan Kahn, the celebrated mystery editor at Harper & Row, accepted "Fadeout," which garnered much publicity and made Mr. Hansen a mini-celebrity.
In the book, Brandstetter investigates an insular community whose popular radio host is presumed dead -- but who conveniently has taken out a $100,000 life insurance policy.
His other Brandstetter books included "Early Graves" (1987), about a killer of gay men with AIDS. In Time magazine, William A. Henry III wrote that "Early Graves," which emphasized the hysteria that the autoimmune disease caused, will "rank with the best" of novels addressing AIDS.
In 1992, Mr. Hansen received a life achievement award from the Private Eye Writers of America.
He also wrote books of poetry, other detective series, several non-detective novels and a biography of Don Slater, who founded the gay and lesbian magazine One in 1953.
Mr. Hansen was married to the former Jane Bancroft, a teacher and translator, for 51 years until her death in 1994. He told Out magazine in 2003 that his wife was a lesbian and that they had an "agreement" to see other people, provided they first asked each other, "Was this person OK?"
"Here was this remarkable person who I wanted to spend the rest of my life with," he said of his wife. "So something was right about it, however bizarre it may seem to the rest of the world."
The couple had a daughter who later underwent a sex-change operation and is now known as Daniel James Hansen. He survives.