The prime minister admits defeat in the high-stakes vote on a justice reform package but vows to keep her seat.