The officers were shot after they arrested two suspected robbers and brought them into head office for questioning.
Local media reported that the two suspects were brothers and had been accused of stealing a scooter hours before their arrest.
It is believed that one of the robbers asked to use the bathroom before stealing a gun from an officer and shooting him.
A shootout ensued, in which the two deceased officers – along with three further police and one of the robbers – was injured.
The robbers managed to flee the scene, although they were both later apprehended by police.
The officers have been named as Pierluigi Rotta, 34, and Matteo De Menego, 31.
Both were seriously wounded in the shootout, later succumbing to their injuries in hospital.
The Mayor of Trieste, Orlando Pocci, told Italian media that the incident was a “tragedy which leaves our community speechless”.
A tweet by State Police read: “Police Chief Gabrielli and Interior Minister [Luciana] Lamorgese are reaching Trieste to support families of Pierluigi and Matteo and expressing sympathy to the women and men of the police headquarters in Via Tor Bandena and to all of Trieste.”
Rotta, from Pozzuoli but born in Naples, had served with the force from June 2016.
Demenego was assigned to Trieste on September 24, 2013, and reportedly celebrated his birthday just a week ago.