Updated

Australia pledged ongoing support to Afghanistan during a visit by the Afghan president on Monday, after hundreds of protesters demanded a better deal for the Hazara ethnic minority.

Prime Minister Malcom Turnbull and President Ashraf Ghani signed an aid agreement at the Australian Parliament House worth 320 million Australian dollars ($240 million) over four years.

The two countries will cooperate on infrastructure, education and employment of women and girls, agriculture and water management, training of Afghan civil servants and anti-corruption initiatives.

Hundreds of protesters came to the capital, Canberra, to demonstrate against the first visit to Australia by an Afghan president, calling for Ghani's government to end discrimination against the Hazaras and repatriation of asylum seekers rejected by Australia.

The protesters gathered outside Government House, where Ghani met with Governor General Peter Cosgrove.

Hazara protester Barat Ali Batoor said the security situation in Afghanistan had deteriorated too much for the Afghan government to continue to accept asylum seekers rejected by Australia. Afghanistan signed a memorandum of understanding with Australia in 2011 to accept failed Afghan asylum seekers.

"There needs to be a moratorium on any more forced repatriations," Batoor said.

Refugee Action Coalition spokesman Ian Rintoul said Hazaras were rarely returned by Australia and it was unclear whether the Afghans would now be prepared to accept such forced removals.

Some estimates put the numbers of protesters, many of them Shiite Muslim Hazaras, at between 1,000 and 2,000 men, women and children. Protest organizer Najeeba Wadzefost said as many as 3,000 had gathered from across Australia and neighboring New Zealand to mark Ghani's first official function on his visit.

"We are seeking that our President Ghani take practical, concreter steps to protect the rights of all ethnic groups in Afghanistan, including the Hazaras," she said.

She also urged Australia not to give aid to the current Afghan government, saying the money would end up in the hands of war lords.

Ghani arrived in the Australian capital, Canberra, late Sunday and is to leave on Wednesday.

He laid a wreath at the Australian War Memorial on Monday before meeting with Turnbull on Monday night.

Australia has lost 41 troops in Afghanistan since the U.S.-led invasion in 2001.