Amongst the 15-strong committee criticised was one black man, who called the image “insulting”. The chairman of the union’s National Black Members Committee went further, saying it was “offensive and racist”.

The group tried to defuse the row, apologising for inadvertently causing offence. But the union began a full-scale investigation, resulting in them being banned from holding office.

Now, after a four-and-a-half year legal battle costing up to £200,000, the matter has been settled, after an Employment Appeal Tribunal ruled in favour of the four and criticised the union’s reaction.

Glenn Kelly, 50, one of those behind the leaflet, said: “The whole thing was a nonsense. The way we were targeted you would think that the British National Party had produced the leaflet.”

The ordeal of the so-called “Unison Four” began at the union’s annual conference, in June 2007. Mr Kelly, former secretary of the Bromley branch; Onay Kasab, former secretary of the Greenwich branch; Brian Debus, 64, former chairman of Hackney branch; and Suzanne Muna, 45, former secretary of the Tenants Services Authority branch had all submitted motions which were rejected by the union’s Standing Orders Committee (SOC).

The four, all members of the Socialist Party — formerly Labour’s Militant Tendency — wanted the conference to discuss proposals to cut funding of the Labour Party and elect full-time officials. In response to the SOC’s decision they produced the leaflet and distributed 1,500 copies.

But shortly after the conference began Bev Miller, chairman of the Black Members Committee, made a speech attacking the document and denouncing those behind it.

She said that the leaflet “belonged in the past with Bernard Manning” and that “black members and all other decent anti-racist trade unionists who understand the historic and racist denigration of black people did not find the joke funny”.

Clytus Williams, chairman of the SOC, added that his committee — of which he was the only black member — “did not expect to be insulted in the literature distributed to conference delegates”.

A number of union members complained to senior officials about the leaflet and the four wrote to both committees to refute the charge of racism but to apologise for any “unintentional offence”.

Despite this, an investigation was launched which, eight months later, resulted in the four being told that disciplinary charges would be brought against them for the “racial offence” caused by the leaflet.

The hearing took place over nine days spread between May 2008 and July 2009. In their defence, the four complained that there had been other occasions when members had inadvertently caused offence but had not been disciplined. At the 2007 conference another official was criticised after remarking about seeing a “sea of orange” in reference to a display of voting cards. He explained that the comment was not a reference to the politics of Northern Ireland.

However, the union ruled that the four should be barred from holding office for between three and five years. They brought a claim against Unison, claiming they had been unjustifiably disciplined under the Trade Union and Labour Relations Act.

At the tribunal, Unison insisted the leaflet was racist. Mr Williams, the only SOC member to give evidence, said it had “caused him racial offence”.

The tribunal ruled in favour of the four in January 2011. The union, which has more than 1.3 million members, appealed, but on February 22 the Employment Appeal Tribunal again ruled in the four’s favour.

The judgment said: “It never occurred to [the four] that anyone would take [the image] out of context and consider it to be racially offensive because one member of the SOC, the chairman, was a black man.”

The four, who have paid their own costs, estimate the union has spent around £100,000 bringing the case. They are now waiting to be reinstated to their former positions. They are also hoping they will be awarded damages and costs of up to £25,000 each — bringing Unison’s potential bill up to £200,000.

A spokesman for the union said: “Unison is considering the recent judgment and the merits of taking an appeal.”