Can foreign citizens who studied in Portugal stay in the country to work?

Portuguese law establishes two types of residence permits for those who wish to study in Portugal: a residence permit for secondary education students (known in Brazil as “high school”) and a residence permit for higher education students, i.e., university students.
In Portugal, secondary education includes the 10th, 11th, and 12th grades. The residence permit for these students is provided for in Article 92 of Law No. 23/2007 of July 4. It can also be granted to students enrolled in qualification level 4 or 5 courses under the National Qualifications Framework: level 4 courses are vocational programs aimed at the initial training of young people, facilitating their entry into the labor market while allowing them to continue their studies, while level 5 courses are designed to provide a qualification based on specialized technical training.
Higher education, on the other hand, includes study cycles corresponding to a bachelor’s degree, master’s degree, and doctorate, and the residence permit for these students is provided for in Article 91 of Law No. 23/2007 of July 4.
Having outlined the types of residence permits available for those who plan to study in Portugal, let’s examine what the law says about situations in which foreign citizens have completed their studies but wish to remain in the country to work. Can they do so?
The answer to this question is found in two legal provisions. First, Article 122(1)(o) of Law No. 23/2007 of July 4 establishes that a residence permit may be granted to foreign citizens:
“who, having benefited from a residence permit for secondary education students under Article 92, or from a residence permit for first-cycle higher education students under Article 91, and having completed their studies, intend to carry out a professional activity in the national territory, either as employees or self-employed workers, except when the permit was issued under cooperation agreements and there are no compelling reasons of national interest justifying it.”
It is important to note that this article specifically applies to first-cycle higher education students, i.e., bachelor’s degree students, and does not apply to other study cycles such as master’s or doctoral degrees.
In these cases, Article 122(1)(p) of Law No. 23/2007 of July 4 allows the granting of a residence permit to students who have completed their studies and
“intend to benefit from a maximum period of one year to look for a job or start a business in the national territory compatible with their qualifications.”
In all these situations, the residence permit regime is special because it does not require a prior visa for this purpose. This means foreign citizens do not need to leave Portugal, return to their home country, and obtain a residence visa to come back. They may remain in Portugal and apply for the new residence permit directly.