Stephen Gately died of natural causes on 10 October last year
The press watchdog has decided not to uphold a complaint by Stephen Gately's partner about a Daily Mail article on the Boyzone star's death last year.
The Press Complaints Commission (PCC) received a record 25,000 complaints about the Jan Moir comment piece which was perceived by many to be homophobic.
The watchdog's head said aspects of the piece were "extremely distasteful".
But the PCC said it was an essential point of principle that papers could print views which might offend readers.
Meanwhile, the Crown Prosecution Service has ruled the article did not break the law.
The ruling came on the same day that Boyzone gave their first performance without Gately.
They sang new single Gave It All Away - which features Gately's lead vocal - on GMTV.
Gately died of natural causes at his holiday home on the Spanish island of Majorca on 10 October last year.
Ms Moir's article was published the day before the gay singer's funeral. It discussed his lifestyle and implied the cause of his death had not been natural.
Ms Moir said Gately's death struck a blow to the "happy-ever-after myth of civil partnerships".
The journalist has expressed regret over the offence caused by her piece, but has denied there were homophobic undertones.
Ms Moir admitted the timing of her original column was "insensitive"
The singer's civil partner, Andrew Cowles, complained that the article - and a follow-up - were inaccurate, intrusive at a time of grief, and discriminatory.
The column also prompted a furious reaction on the micro-blogging site Twitter, leading to thousands of complaints to the press watchdog.
The PCC recognised there were flaws in the article, but said the price of freedom of expression was that columnists said things which other people might find offensive or inappropriate.
It said Ms Moir had been right to apologise to the family for the "ill-timed nature of the article", and the newspaper had to accept responsibility for the distress it had caused.
PCC chairwoman Baroness Buscombe said the commission found the article "in many areas extremely distasteful" but that the Mail had escaped censure because it "just failed to cross the line".
The PCC had considered context and "the extent to which newspaper columnists should be free to publish what many will see as unpalatable and unpleasant stories".
"We found, after very rigorous debate, that this was a very public individual loved by many and indeed a very public death," Baroness Buscombe told BBC Radio 4's Today programme.
"Okay, it was very close to his funeral, but it was after there had already been acres of comment about his life and about his death."
Mr Cowles said in a statement that he was satisfied with the PCC's ruling.
"It sets straight some of the facts which have been wrongly reported," he said.
Ben Summerskill, chief executive of gay rights charity Stonewall, told the Today programme the PCC was flawed because "it says that it regulates decency and, of course, it's self-regulating".
"We wouldn't allow investment banks to say 'don't worry about the auditors, we'll self-regulate' or mining companies to say 'don't worry about health and safety, we'll look after ourselves'.
"And I think we have got to a position where it's very difficult to recommend that anybody from a minority community makes a complaint to the Press Complaints Commission."
But Baroness Buscombe said the PCC provided "regulation, independent of the state" and it was "therefore flexible and free to be able to consider important things like freedom of expression".
Ms Moir's column, headed A Strange, Lonely and Troubling Death, led to two complaints to the Metropolitan Police which were passed on to the Crown Prosecution Service (CPS).
It found the article caused some offence but there was insufficient evidence that it breached the law.
Boyzone did not speak about the PCC's ruling and a spokesman later told the BBC the band would not be commenting on it.
Speaking about Gately's death on GMTV, Boyzone's Mikey Graham said the band were "still trying to find our way moment by moment".
"It's a very difficult process to be doing the new single without Steo though we feel he's with us."
Fellow bandmate Ronan Keating said: "This is the part we've been nervous about because we don't know what it's going to be like as a four-piece and actually getting out there and singing it."