Dublin: People love a good story at this time of year, and preferably one with a twist. This past week, Ireland was stirred by the story of two men in Dublin who, three days before Christmas, married for tax reasons.

Local news media flocked to a civil registration office in Dublin on Friday to witness the wedding of the men, Michael O’Sullivan, 58, and Matt Murphy, 82. The two men are close friends, although they have never been romantically or sexually involved. O’Sullivan is Murphy’s caregiver.

Murphy, a retired valet, telephonist and unrepentant hoarder, owns a small house in Dublin’s north inner city, but his eyesight is failing and he cannot afford to pay for home care. O’Sullivan, a former computer technician and a part-time actor, had lost his work and his apartment in the recent recession, and was reduced, at times, to living in his car.

“He said, ‘You need somewhere to live, and I need someone to take care of me’,” O’Sullivan recalled. “Why don’t we join forces?”

That was nine months ago, but marriage was something of an afterthought. Murphy, having no heirs and no money to pay O’Sullivan to care for him, offered to leave the younger man his house in lieu of payment and as a sign of thanks.

Then, O’Sullivan, who has three children from previous relationships, realised that would cost him around €50,000 (Dh218,085) in inheritance taxes.

The fact that Ireland had recently approved same-sex marriage — the first country in the world to do so with a referendum — offered a solution. When 62 per cent of voters supported same-sex marriage in 2015, the result was seen as emblematic of how much Ireland had changed since the days when the powerful Roman Catholic Church effectively outlawed sex outside marriage, to say nothing of gay love.

The pair consulted a lawyer, who advised that there was no reason under the marriage-equality law that two heterosexual men or women could not marry.

News of their intentions became public when Murphy called into a popular radio show last week about an unrelated matter. While he waiting to go on the air, he mentioned his marriage plans to a researcher. She informed the show’s host, Joe Duffy, who asked Murphy about it on air.

Reactions were overwhelming. “We have yet to get a single negative response to that story,” Duffy said.

Support came from unexpected places. O’Sullivan described taking his husband to light some candles at a Catholic church in the city centre over the weekend. A nun, recognising the two from coverage in the news media, introduced them to a 92-year-old priest and other retired members of the clergy who wanted to congratulate them.

Not that they wanted a church blessing, O’Sullivan confided. “Matt isn’t that religious,” he said. “He’s actually a Protestant. He just likes lighting candles in Catholic chapels.”

They may not be lovers, but the two men make a nice couple. Murphy, a slender, dapper man, uses a cane when he walks, with O’Sullivan solicitously supporting his elbow. While they sat outside a Dublin bar over the weekend so that the elder man could work through the half-pack of cigarettes he still smokes every day, several busy Christmas shoppers recognised them, and some stopped to shake their hands.

Their main concern now, O’Sullivan said, is that they not be seen to have taken advantage of the hard-fought achievements of gay, lesbian, bisexual and transgender people.

“They fought hard for this right,” he said. “They were brilliant. They got equality for themselves, but also for everybody else, too, including us. We may not be in a sexual relationship, but I’m his carer and his friend.”

And here is another twist in the tale. True, they are not a gay couple, but one of the men is gay. (Irish news media, the men said, reported that the two are straight and never thought to ask whether one of them is gay.)

Murphy said he had always been gay, and he has had long-term relationships in the past. His heterosexual husband was fully aware of this.

“What does it matter, if we’re friends and it works for us?” O’Sullivan said. His husband agreed.

“When I was in relationships with men before, it was always the friendship that was the most important thing for me,” Murphy said.

“To have someone to open up to, and go out with and talk to. For me, it was never about casual flings. If two people can live together and help each other, that is the most important thing in life. I am really blessed that someone is there for me.”

Then they got up, said, “Happy Christmas,” and went to get lunch.