David Cameron has declined to join the chorus of calls for an apology to former armed forces chief Field Marshal Lord Bramall, insisting it would be wrong for a prime minister to seek to put pressure on independent police and prosecutors.
But Mr Cameron said he hoped that if the authorities felt they had made mistakes in a case, they would "feel big enough to give people some comfort afterwards".
The Metropolitan Police has faced a growing clamour to apologise to the 92-year-old veteran of the D-Day landings after it announced on Friday there was "insufficient evidence" to proceed against him over allegations of historical child sex abuse.
During the course of the nine-month investigation by the Operation Midland inquiry team, Lord Bramall's home was raided by up to 20 officers while he had breakfast with his terminally-ill wife and his name was widely reported in the media.
London Mayor Boris Johnson said that while much of the ensuing criticism of the police had been misplaced, Lord Bramall now deserved a proper apology for his treatment.
Writing in his weekly column in The Daily Telegraph, Mr Johnson said: "It is pretty clear that Field Marshal Lord Bramall is owed a full and heartfelt apology."
Asked whether he backed calls for an apology, Mr Cameron told BBC Radio 4's Today programme: "(Lord Bramall) is a wonderful man with a great record of serving our country and I think what happened to him would have been very distressing."
But he added: "I think it is very difficult for a prime minister to get involved in these arguments because the police and the prosecuting services must be free to follow the evidence where it leads and go after people, no matter how high and mighty they are.
"But if they feel they get it wrong, I hope they can feel big enough to give people some comfort afterwards."
Mr Cameron said: "Prime ministers can't go around ordering the police to apologise here or the prosecutors to drop this prosecution. We are a country of independent institutions. The police are independent - they can't be ordered around by me. The prosecutors are independent - they can't be ordered around by me. That's right.
"But we are also a country, I hope, of common sense and judgment and the great thing about having independent institutions is they can exercise some independent judgment."
Mr Johnson said Lord Bramall's eminent position and record of service to his country may have "made things worse" for him when allegations were made.
He acknowledged the "extreme difficulty" police faced when it came to investigating such cases, saying it was Lord Bramall's prominence as an establishment figure that meant they felt the need to show "a scrupulous refusal to be intimidated".
He wrote: "The police have a duty to follow the evidence - wherever it takes them. Imagine if it turned out that they had gone soft on the Field Marshal, just because he was so well connected.
"You can't blame the police, in the current climate, for taking no chances, though I can imagine that such evidence may be treated with even more circumspection. In this case they were plainly barking up the wrong tree.
"I hope a way will be found of making amends, because being a British war hero didn't help Bramall against these allegations; on the contrary, there was a sense in which his status simply made things worse.
"He deserves to put the last year behind him and accept the continued thanks of his country."
Journalist Sir Max Hastings, a close friend of Lord Bramall, told The Independent: "It seems to me that (Metropolitan Police commissioner) Sir Bernard Hogan-Howe has a clear responsibility to make an apology to Lord Bramall and to make the statement that the Metropolitan Police should have made in its letter to him that these charges have been exhaustively investigated and have been found to be baseless.
"That's what they should have done. They should also make some sort of offer to Lord Bramall. He has faced a huge legal bill because of this."