The battle over over the election result for Birmingham City Council's Aston Ward raised constitutional issues never before considered by the courts.
Mr Ahmed was initially selected as the official Labour Party candidate to stand in election. But he was dropped by Labour before the poll and replaced by Mr Kennedy, of Botteville Road, Acocks Green, who won.
Mr Ahmed lodged an 'election petition' at London's high court which he hoped would open the way for a fresh poll.
But top judges dismissed his claim in October, ruling his petition was 'a nullity' because deadlines for serving certain crucial documents laid down by the Representation of the People Act had not been met.
The court ruled that the 1983 Act created a 'rare category' of compulsory time limits, 'non-compliance with which makes the petition a nullity'.
Mr Ahmed's appeal against that decision was today dismissed by Lord justice Simon Brown, sitting at London's appeal court with Lord justice May and Lord justice Clarke.
He said the court had 'no discretion' to extend the strict time limits for service of documents laid down by the Act and any change to the existing regime could only be a matter for parliament.
Mr Ahmed was ordered to pay the legal costs of the case but, as he was legally aided, the costs order can only be enforced if he for some reason comes into substantial funds.
Labour Party lawyers estimated later that their own legal costs of fighting Mr Ahmed's petition came to around£20,000.
Mr Ahmed's counsel, Nigel Pleming, had urged the appeal court to either 'rectify or overlook' defects in Mr Ahmed's presentation of his electoral petition - But Lord justice Brown ruled the court had no power to do so.
In his petition, Mr Ahmed claimed that, after he was dropped as the Labour candidate, a series of 'false statements' were made about him in the press, letters and leaflets, which affected his candidacy.
But Lord justice Brown said that, as Mr Ahmed's election petition would now never be heard, 'the least said about its contents the better.'
STRAND NEWS SERVICE