A Queens rabbi who admitted to stealing $5 million from special needs students has been sentenced to up to three years in prison.

Rabbi Samuel Hiller — the former head of one of the city’s largest providers of resources for pre-schoolers with disabilities — will also have to cough up $1 million in restitution and forfeit over $1 million in seized assets as part of a plea deal. The former assistant director of Island Child Development Center also agreed to shell out $3 million more at a later date.

Hiller, 59, copped to charges of first-degree grand larceny in April as part of a plea deal, which he admitted to siphoning city and state funds destined for three to five-year-olds with special needs.

Queens Supreme Court Justice Joseph Zayas sentenced Hiller to one to three years in state prison Monday.

The disgraced rabbi used the stolen funds to float his own for-profit summer camps, prosecutors said.

Three of Hiller’s colleagues were also charged, and have since pleaded guilty to various charges related to the scheme.