Jury selection for the trial took more than a week, and concluded on Monday. Eighteen jurors — 12 women and six men — sat in the courtroom on Wednesday. Six of them are alternates who will not take part in deliberations unless they are needed to replace excused jurors, but none of the 18 will be told which of them are alternates until the trial concludes.

With warnings beforehand to the victims and their families in the courtroom, prosecutors played graphic videos from police body cameras, capturing Mr. Mateen’s gunfire and the screams of the wounded.

Adam Gruler, an off-duty police officer who was working as a guard at Pulse the night of the shooting, was choked with emotion on the witness stand as he recalled victims trying to flee the carnage. Nelson Rodriguez, a nightclub patron who lost two friends in the rampage, had to compose himself several times before he could finish his account of a frantic escape.

Prosecutors said Ms. Salman had participated in Mr. Mateen’s preparations for the attack, including making financial arrangements intended to provide for her and her son after his death. They cited location data from cars and cellphones showing that the couple drove to City Place, a shopping mall in West Palm Beach, and to Disney Springs in Orlando.

“The defendant and Omar Mateen were casing targets in the middle of the night with their child,” Mr. Mandolfo said.

Ms. Moreno countered that those were just family trips for Ms. Salman.

Crucial to the outcome of the trial will be what jurors make of statements that Ms. Salman gave to the F.B.I. on the day of the attack. While the shooting was still underway, law enforcement officers went to the family’s apartment in Fort Pierce, Fla., at about 4:30 a.m. and found her asleep there. She was taken to a local F.B.I. headquarters and remained with agents, speaking without an attorney, until midnight.

During that time, Ms. Salman gave statements that agents said were inconsistent. She also signed written statements appearing to acknowledge that she was aware of what Mr. Mateen had planned, and saying that she was sorry.