Spain 's National Court has sentenced a Spanish citizen , released last year from the U.S. detention facility at Guantanamo Bay , Cuba , to six years in prison for membership in al-Qaida .