"Your mums and dads, your brothers and sisters, your wives and husbands and partners and your kids are all enormously proud of you," he said.

"It's time we brought you home.

"When the flag of Australia is brought down for the last time a few months from now, you will have been a part of history."

Ms Rein, believed to be the second wife of an Australian prime minister to visit a warzone, said she was proud to meet some of the soldiers.

"I am really, really proud to have been able to shake the hands of some of these amazing people," Ms Rein said.

Your mums and dads, your brothers and sisters, your wives and husbands and partners, and your kids are all enormously proud of you. It's time we brought you home.

Prime Minister Kevin Rudd

Some of the soldiers said they were excited by Mr Rudd's visit.

"I'm very honoured that he's actually taken the time out of his very busy schedule to come and do that for us, it's fantastic, 100 per cent support from Australia and he represents our country, everything we do, so [it] makes you a very proud Aussie," one said.

By the end of the year, 1,000 of the remaining 1,300 Australian troops will have returned home.

The other 300 will stay as advisers and trainers based in Kabul and Kandahar.