The Ministério Público (MP) is the Public Prosecutor (and not a ministry, despite the name). Under the MP are:
+ Procuradoria-Geral da República (PGR): Office of the Attorney General
+ Magistrados: Magistrates. This is an examining magistrate system, so the Procurador-Geral da República (confusingly, also PGR; Attorney General), Procuradores-Gerais-Adjuntos (PGA; deputy attorney general), and Procuradores (prosecutors) are magistrates.
Tribunais judiciais are courts, and are a separate system under the Tribunal Supremo (Supreme Court)
The Ministério da Justiça, Assuntos Constitucionais e Religiosos includes both MP and courts.