An Australian man appeared in court Tuesday on terror charges after police say he tried to join Kurdish-aligned forces battling the Islamic State group in Iraq.

Jamie Williams, 28, was stopped by customs agents as he was boarding a flight to Qatar at Melbourne airport in December after military-style equipment and clothing were found in his luggage, the Australian Federal Police and Immigration Department said in a statement. He was charged with making preparations for incursions into a foreign country for the purpose of engaging in hostile activities.

Williams did not apply for bail in Melbourne Magistrates Court on Tuesday, and was remanded to custody until his next court appearance in October. If convicted, he faces a maximum punishment of life in prison.

Outside court, his lawyer Rob Stary said Williams would apply for bail soon. He declined to comment further.

Williams' court appearance comes one day after an Australian nurse appeared in the same court on a charge of supporting a terrorist group. Adam Brookman, 39, voluntarily returned to Australia from Turkey on Friday after he says he was forced by Islamic State militants to work as a medic in Syria.

The Islamic State group has been particularly effective at recruiting followers in Australia. The London-based International Center for the Study of Radicalization and Political Violence estimates that between 100 and 250 Australians have joined Sunni militants in Iraq and Syria, a relatively high number given Australia's population of just 24 million.

In a bid to stem the flow of foreign fighters heading to the Middle East, Australia made it a criminal offense for its citizens to travel to certain parts of Iraq and Syria that are held by Islamic State movement fighters. The government has also canceled the passports of people it believes are planning to join the fight in the Middle East.

In Williams' case, police say he was planning to fight alongside Kurds who are battling to win back territory that Islamic State militants have seized. Australian Federal Police Assistant Commissioner Neil Gaughan said traveling to Syria and Iraq to support either side of the conflict is illegal.