A Pakistani immigrant has been sentenced to 30 years in prison for helping an al-Qaida operative gain entrance to the United States .