Algerians were recruiting for al-Qaida, court told