Warwickshire County Cricket Club trail Hampshire on the second day of their County Championship game at Edgbaston.
Hants resumed on 304/4 and had Adam Wheater hit an unbeaten 204 with Ervine adding 75 before they were bowled out for 531.
Josh Poyseden took 4-85 and Jeetan Patal 3-160.
Warwicks batted and lost Andy Umeed for a duck, Ian Bell for five and Varun Chopra for 39 as they closed on 131-3.