A man sentenced to 10 years in prison for illegal gun possession is entitled to a new trial because he was allowed to testify only after he protested in front of the jury that he had not been permitted to take the stand, a divided panel of the Appellate Division, First Department, ruled yesterday.

Under the circumstances, Justice Eugene Nardelli wrote for a 3-1 majority, even though the constitutional error of initially denying the defendant, Rashawn Mason, an opportunity to testify had been belatedly cured after summations were completed, the damage to his case was lasting.