In six months, the prime minister orchestrated the defection of five lawmakers to his side and won a special election.