Praise be to Allaah.
It is a sin and he should be punished (ta’zeer – punishment to be specified by the qaadi/Muslim judge). He also has to repent. And Allaah knows best.