Both sides targeted marginal seats in resource-rich Queensland and western Sydney, where rapid population growth has put pressure on services and raised concerns about immigration.
Australia's first woman prime minister and opposition leader Tony Abbott were both scrambling to broker deals to form a fragile coalition government after Australians Saturday stripped Gillard of her right to rule alone.
As vote-counting continued, Gillard, who toppled predecessor Kevin Rudd in a brutal party coup, was lagging behind her conservative challenger by 70 seats to 72, with 78 percent of the ballots counted, public broadcaster ABC said.
The stunning fall from grace of the centre-left Labor Party government has left Liberal/National leader Abbott poised on the brink of power if he can cobble together a coalition government.
"The Labor Party has definitely lost its majority," Abbott told jubilant supporters late Saturday in what appeared to be a barely restrained victory speech.
"What tha