Unionists in Northern Ireland have welcomed the Irish government's decision to formally pardon thousands of Irishmen branded traitors and deserters for fighting for Britain against Hitler in the second world war.

The move will be perceived as another step in improving relations between Ireland and Northern Ireland.

Thousands were barred from civil service jobs and ostracised in the Irish Free State after the war because they had joined the British armed forces, some of them deserting the Irish army to sign up against the struggle to defeat Nazi Germany.

The Free State had been neutral in the war.

The Irish defence minister, Alan Shatter, is due to announce details of the pardon during a debate in parliament on Tuesday. The decree is expected to be passed and signed into law by the Irish president, Michael D Higgins, within days.

Ulster Unionist assembly member Michael Copeland paid tribute to the 5,000 southern Irishmen who joined the allies and welcomed the move by the Dublin coalition.

"They were not traitors, they were heroes, and I welcome the fact that the republic as a state now formally recognises that fact," he said.

"With the passing of time, a relatively small number of the affected men are still with us, but many family members are still alive who have first-hand memories of the injustice and discrimination suffered in the postwar years at the hands of the Irish state."

Copeland added: "I trust that the apology and pardon from the current Dublin government will be of some comfort to the veterans and their families. I salute their memory."

The relatives of the 5,000 soldiers have been campaigning for an apology and pardon. Peter Mulvany, the co-ordinator of the Irish Soldiers Pardons Campaign, said: "It will be a recognition that the experience they went through was unfair. It was a punishment they should not have been given."