ROME — The lives of two American teenagers and two Italian law enforcement officers crossed paths for less than a minute in the early hours of July 26, 2019.

Yet the consequences of that brief encounter began to be played out on Wednesday when the two Americans — Finnegan Elder, now 20, and Gabriel Natale Hjorth, now 19 — went on trial for the murder of Deputy Brig. Mario Cerciello Rega of the Carabinieri, Italy’s paramilitary police force.

The case made front page news for days in Italy, and so many journalists packed the courtroom on Wednesday that Marina Finiti, the presiding judge, mulled moving future hearings to a much larger courthouse normally used for terrorism and mafia trials.

Camera shutters clicked wildly when Mr. Elder and Mr. Natale Hjorth entered the courtroom and took their seats next to their lawyers, avoiding eye contact with the crowd. Mr. Elder’s parents and Mr. Natale Hjorth’s uncle sat in the back row. Mr. Cerciello Rega’s widow and his brother sat two rows ahead.