An anti-terrorism court sentenced on Thursday a lawyer to a total of 18 years and six months in prison for beating up a civil judge.