Foreign criminal allowed to stay in UK after judge rules his involvement in a gang shows he has integrated