 He was imprisoned until mid-February 1921 and was re-arrested soon after his release and remained in prison until December 9, 1921 where he was released under a general amnesty of the Anglo-Irish Treaty of December 6, 1921.McNamara fought on the Republican side in the Irish Civil War (1922–1923).He was made commandant of the Strand Barracks in Limerick in March 1922.