Residence visa for higher education study (D4)
For students accepted on a degree programme of more than one year at a Portuguese higher education institution. The visa lets you enter; you then apply to AIMA for a student residence permit (Art. 91, Foreigners Law).
Official page for Residence visa for higher education study (D4)(opens in a new tab)