Coalition faces by-election defeat amid budget crisis.