Sheriff resigns after 3 stormy years