(Alla Dreyvitser/The Washington Post)

On June 26, when the White House glowed rainbow colors after the Supreme Court legalized same-sex marriage, it was easy to be optimistic about the progress of gay rights. There are still deep potholes of bigotry across the landscape, of course, but the direction of history seems clear.

While writing her new novel, “Tender,” about a young Irishman in 1998 wrestling with his sexuality, Belinda McKeon was acutely aware of this welcome shift in attitudes. “I was worried that it would seem like an old struggle that nobody wanted to listen to anymore,” McKeon says from her home in Brooklyn. “But no, this hasn’t changed as much as you would think. It’s possible to be out in Ireland the way it wasn’t 15 or 20 years ago — much less 30 years ago, but there’s still a way in which it’s hard.”

“Tender” provides a poignant look at one such conflict of desires in this progressive era. The story opens in Dublin when a college student named Catherine becomes so enamored of a young photographer that she can barely contain her wonder. “James had given her so much, so many new things to think about,” McKeon writes, “things it had never really occurred to her to think about before. Like how little she knew about, well, everything, really.” This is friendship in those fresh days of wide-eyed amazement. “He was funnier than anyone she’d ever met,” Catherine thinks. “Everything about him was so lit up by this brilliant, glinting comedy; he was so quick, and such a good mimic.”

McKeon could have easily slipped into parody or riddled her narrative with dramatic irony, but instead she fills these early pages with cascading phrases that flex with the enthusiasm of young love. Inhale deeply and let your voice flow over this single indefatigable sentence that describes James meeting Catherine and her friends at an Andy Warhol exhibit: “And then came the next moment, which was the moment when she saw who the person in the doorway was, and if her breath seemed to have gone as she danced under the helium pillows, as she wove and jumped and shouted in the silver stream, then it had not gone at all, there had been plenty of it, because it was gone now, and it was really gone, and she had gone still and the silver was plunging around her, and Zoe was still leaping, and James was there, a young, thin boy in the doorway, no, a boy who looked somehow at once both young and old, his red hair grown high and grown messy, into huge, tumbling curls, his skin pale, his freckles faded, his smile nervous, and hesitant, and moving, now, his lips were moving, as he said her name.”

Author Belinda McKeon (Alen MacWeeney)

McKeon captures that rare germination of affection that can suddenly change the whole landscape of one’s life. Just weeks after they’re introduced by mutual friends, Catherine and James have developed a stash of inside jokes from films they love and private phrases from odd things people have said to them. As an 18-year-old virgin who would rather put off sex, Catherine isn’t curious about James’s chaste demeanor. What’s to object to? Here, finally, after suffering the grunts and shrugs of high school, is “a boy who could talk.” In fact, “outside of television, she had never heard a boy talk so sincerely, so emotionally, before.”

We suspect long before Catherine does, but when James comes out to her — shattering what she worries might be a marriage proposal — she does her best to sputter, “I’m so glad you told me.” And yet she’s immediately jealous, first of other friends James has already told and then of any potential boyfriends he might pursue. Having a Gay Best Friend isn’t the giddy thrill Catherine hoped it would be. As the narrative begins to break down into isolated sentences and impressions, McKeon follows her troubled and troubling behavior. While James slowly gains the confidence to come out of the closet, Catherine retreats into a dark realm of possessiveness, which, to her shame, is just as poisonous as the homophobia James is trying to escape.

It’s excruciating to watch this once happy young woman devolve into such a conflicted, destructive character, and it’s even more unsettling to learn that her story was inspired the author’s actual experience. There are layers here that raise complicated questions about the tension between autobiography and fiction, confession and art.

With her lightly inflected Irish accent, McKeon notes that she had a very close friendship when she was in college that eventually became more than a friendship. “We leaned on each other in ways that turned out not to be good for each other,” she says. “It was always something I wanted to write about.”

But how, I wonder, does one write a novel about betrayal without committing that betrayal again?

“Writers are monsters,” McKeon admits with a gentle laugh. “You have to keep writing until you get beyond the rawness, and then you can stand over it. I had to sort of take my courage in my hands and take the risk. It took me four years. I didn’t talk to anybody, except my husband, about it while I was writing it. And many times I panicked and thought, ‘I can’t do this.’ ”

What finally saved her — and her novel — is the fact that she wasn’t writing a memoir.

(Lee Boudreaux)

“Even though it started from that autobiographical source,” she says, “having life to draw on turned out not to be enough. You still have to write the thing. That’s hard no matter how much raw material you think you might have.” Later, via email, she adds, “Much of the actual texture of the narrative is fictional. It had to be, in order for the story of these two characters to work as a novel: Life doesn’t have the shape of story.”

Still, McKeon readily admits that she was nervous about telling her old friend that she had written a book based on their painful, private experience. “We met in Dublin, and he was very generous about it,” she says. “He was amazing about it.”

McKeon brings this story to a close with such tenderness and honesty that her friend’s gracious response isn’t entirely surprising. Anybody can feel the real life pulsing through this novel about misaligned affections. But that’s not history — that’s art.

Ron Charles is the editor of Book World. You can follow him on Twitter @RonCharles.

TENDER

By Belinda McKeon

Lee Boudreaux. 404 pp. $27