In Afganistan they had machine guns, were formed in units, and battled the US and Northern Alliance militarily. In that capacity, where they also "terrorists"?
I assumed that this question would come up. Simply forming up in units, using machine guns and fighting someone militarily is not enough to be considered a lawful combatant.
Lawful Combatants. A lawful combatant is an individual authorized by governmental authority or the LOAC to engage in hostilities. A lawful combatant may be a member of a regular armed force or an irregular force. In either case, the lawful combatant must be commanded by a person responsible for subordinates; have fixed distinctive emblems recognizable at a distance, such as uniforms; carry arms openly; and conduct his or her combat operations according to the LOAC. The LOAC applies to lawful combatants who engage in the hostilities of armed conflict and provides combatant immunity for their lawful warlike acts during conflict, except for LOAC violations.
Unlawful Combatants. Unlawful combatants are individuals who directly participate in hostilities without being authorized by governmental authority or under international law to do so. For example, bandits who rob and plunder and civilians who attack a downed airman are unlawful combatants. Unlawful combatants who engage in hostilities violate LOAC and become lawful targets. They may be killed or wounded and, if captured, may be tried as war criminals for their LOAC violations.
Dealing with the Taliban is probably the grayest issue. If I remember correctly, the Taliban was the governing party of Afghanistan. The question becomes whether their acts, once the war started, were authorized under the LOAC.
al Qaeda members? It's black and white. No protection, regardless of forming up, using machine guns, etc.