The government is expected to issue a pardon within the next three months to thousands of Irish soldiers who joined the British to fight Nazi Germany.

Legislation to grant an amnesty to the former troops – who were blacklisted and branded deserters at home – cleared one of its final hurdles today as it passed through a committee stage in the Dáil.

A Department of Defence spokeswoman said it was now hoped the law would be enacted before the end of July, with Defence Minister Alan Shatter expected to make an official announcement at the time.

Mr Shatter has already apologised to the ex-soldiers, who were dismissed en masse from the Irish Army under special powers introduced during the Second World War, known as the Emergency in neutral Ireland.

The Defence Forces (Second World War Amnesty and Immunity) Bill 2012 provides for the granting of an amnesty and immunity from prosecution to 5,000 Irish soldiers who fought with the Allies.

They had been found guilty by a military tribunal at the time of going awol.

Special powers brought in – which became known as the starvation order – saw the deserters barred from state jobs, refused military pensions and faced with widespread discrimination.

Mr Shatter has referred to the soldiers as idealists and said people’s understanding of history has matured and that it was time for understanding and forgiveness.