Julia Gillard
Australian prime minister Julia Gillard has resigned (Reuters)

Australian prime minister Julia Gillard will resign after losing the support of her party's lawmakers to former leader Kevin Rudd.

Gillard is to go to Government House in Canberra and ask the Governor-General of Australia Quentin Bryce to appoint Rudd as PM.

The move came after Gillard lost a leadership ballot against Rudd 57 to 45 in a closed-door meeting.

"I respect the decision they [the Labor MPs] have made," Gillard told a news conference.

Gillard thanked her party members for the "overwhelming support" they showed her as she became the first female PM in Australia's history three years ago.

She acknowledged, however, that the pressure had got too much and congratulated Rudd on his victory.

Gillard surprised political observers by calling the leadership ballot as a means of closing divisions in the Labor ranks ahead of September's general elections.

Rudd's supporters were pushing for a leadership change as Labor fell behind the opposition Liberal Party of Australia, led by Tony Abbott, in opinion polls.

Gillard said she is confident that, even without her leadership, Labor can win the upcoming vote.

"Don't lack the guts, don't lack the fortitude, don't lack the resilience to go out there with our Labor agenda and to win this election,' she told Labor members.

"I know that it can be done, that it will best be done by putting the divisions of the past behind us and uniting as a political party."

Gillard came to power in 2010 after toppling Rudd.

In her final address Gillard talked about her role as the first female premier and the so-called gender wars that have dominated Australia's political debate in recent months.

"There's been a lot of analysis about the gender wars," Gillard said. "Heavens knows no one noticed I was a woman until I raised it."

During her tenure, she became a symbol of women's rights, launching a campaign against misogyny in politics.

"What I am absolutely confident of is it will be easier for the next woman and the woman after that and the woman after that and I'm proud of that," she concluded.