Tamim, who made 128 against West Indies in St Vincent last year, showed no sign of nerves as he brought up his second Test century by gloving a boundary to fine leg off Zaheer.
His lawyers cited a previous case in 2001 when activist Vincent Bethell was granted permission to have no clothes on during his trial at Southwark Crown Court for allegedly causing a public nuisance.