How can I apply for a residency visa in Portugal with a criminal record?

I was accused of trespassing on private property in 2018, but I was acquitted after trial. I am currently living in Portugal and plan to apply for a temporary residency permit. Will this past case affect my application process?

Answers

On Sara Sousa Rebolo answered:

All residence visas / permits for Portugal are subject to the analysis of the criminal antecedents of the applicant. The permit shall be denied if the applicant has been convicted of a crime that, under Portuguese law, would be subject to a punishment with a prison sentence of more than one year, even if this has not been served or its execution has been suspended. A concrete answer would always depend on the content of the applicant's criminal record certificate and the analysis of an expungement proceeding of such charges.

On Diogo Capela answered:

If you've been acquitted, there's no problem; it won't create any obstacles to your application for a temporary stay visa.
However, despite being in Portugal, applying for a temporary stay visa must be made in your country of nationality or where you have been legally resident for more than one year.