The second-youngest PM stepped down amid growing pressure from within his party and beyond.