A Suffolk County judge yesterday barred the release of a former school teacher who has been held in state psychiatric hospitals for the last 19 years, following his admission in 1980 that he had killed and cannibalized a Poughkeepsie teenager.

Suffolk County Justice Harry E. Seidell’s ruling set aside a jury verdict reached after a two-week trial in April. The jury found that the ex-teacher, Albert Fentress, could be released into the community without posing a danger either to himself or others.