The result was a decisive rejection of the opposition conservative Liberal-National coalition and its leader, John Hewson, who had promised radical economic change, including a controversial pledge to introduce a VAT-type tax on consumption.
Although the election was fought almost entirely on economic issues, the result also endorsed Mr Keating's campaign commitment for a referendum in which Australians will be able to choose whether to become a republic by the end of the decade.
Mr Keating is likely to be forced by the realities of power to curtail or postone some of the big-spending promises he made during the gruelling five-week campaign. But he is firmly committed to sticking by his pledge to launch the constitutional process of working towards a Federal Republic of Australia, which would involve replacing the Queen with an Australian head of state.
Mr Keating claimed victory shortly before midnight, in front of cheering supporters at the sports club in Bankstown, the working-class Sydney suburb where he was born 49 years ago and where he returned to launch his campaign.
He told them: 'This is the sweetest victory of all. This is a victory of the true believers, the people who, in difficult times, have kept the faith.'
He made no reference to the republic question, but reiterated his call for Australians to reshape their identity as a nation of the Asia-Pacific region, and to become a leading trading partner with Asia during the Nineties.
By the close of counting last night, Labor had won 69 seats, the opposition 56 and independents two in the 147-seat House of Representatives, with 20 seats still to be decided. Labor won a swing of 1.4 per cent of the vote, on the basis of which a computer prediction by the Australian Broadcasting Corporation suggested it might end up with a final majority of 11 seats, five more than in the old parliament. Mr Keating's victory confounded the opinion polls and pundits who had forecast a substantial opposition win. Nine of Australia's 10 leading metropolitan newspapers on Friday had called for a change of government.
He also survived a national mood of dismay over the impact of the worst recession in 60 years, which has left more than a million Australians, or 11 per cent of the workforce, without jobs.
It was Mr Keating's first election in his own right as Prime Minister, since he deposed Bob Hawke as Labor leader 15 months ago. Beaming, waving and blowing kisses to supporters, he said last night: 'I wanted to win again to be there in the Nineties to see Australia prosper, as it will.'
Mr Hewson, 46, also fighting his first election as opposition leader, appeared grim-faced with his wife at a Sydney hotel to concede defeat before Liberal Party campaign workers.
The result is a devastating blow to the Liberals, who have now lost five successive elections with three leaders since 1983. The party which ruled Australia for 23 unbroken years in the Fifties and Sixties is faced with a bitter round of soul-searching and recrimination over its future role in Australian politics.
Mr Hewson's biggest mistake appears to have been his promised 15 per cent goods and services tax, which many voters feared and distrusted.