A Spanish judge has ordered four Algerians held on charges of running a support network for an Islamic extremist group tied to al-Qaida and released seven others on bail while the investigation continues .