The government has dropped a charge against an Australian man accused of preparing to fight with Kurdish militants against the Islamic State movement.

Jamie Williams was stopped by customs agents as he was boarding a flight to Qatar at Melbourne airport in December 2014 after military-style equipment and clothing were allegedly found in his luggage. He was charged with preparing for an incursion into a foreign country for the purpose of engaging in hostile activities.

Attorney-General George Brandis said in a statement on Wednesday that he had decided that prosecutors should drop the charge. He did not explain why.

Williams had faced a potential life prison sentence.

Police warn they will pursue foreign incursions cases, regardless of whether a suspect is for or against the Islamic State movement.