The prosecution’s remarks followed the final witness in the case, a mother who broke down in tears on the witness stand on Thursday as she remembered how the explosion on West 23rd Street knocked her 10-year-old son out cold. The witness, Tsitsi Merritt, who spoke following several hours of scientific testimony about D.N.A. and chemicals, served as a reminder of the human toll of the bombing.
Ms. Merritt had been a passenger in a Toyota when the bomb exploded like “an earthquake” nearby, she said. “My son was in the back seat and the back-seat window was shattered onto him.”
“Was he able to talk to you?” a prosecutor asked.
“No,” she said, and broke down. “I picked him up and at some point an emergency responder took him from me.” A photo of a firefighter carrying the boy was admitted into evidence.
The government rested its case, and for the hour that followed, it appeared in the courtroom that final discussions were being conducted by the defense over whether to call any witnesses, perhaps including Mr. Rahimi himself. But when trial resumed, the defense, too, rested its case. Throughout the trial, defense lawyers have attacked investigative methods, suggesting corners were cut and mistakes were made in searches for evidence.
The government’s case, presented at a brisk pace over eight days, is substantial, and Mr. Bove’s long arguments were assisted by a slide show for jurors on screens in the courtroom. He began by parsing a bloody journal found on Mr. Rahimi’s person after he was shot in a gunfight with the police in Linden, N.J., two days after the Chelsea bomb.
“Everything had to be done quietly and I had to lie to cover my tracks,” one page of the journal read. “The sounds of the bombs will be heard in the streets. Gun shots to your police. Death to your oppression.”
Mr. Bove told jurors, “This is a confession.”
The police found, bookmarked on Mr. Rahimi’s computer, several how-to articles about making bombs in online magazines promoting jihad, including Inspire, said to be published by Al Qaeda.
Mr. Rahimi went on to plan his attack in 2016 by visiting Home Depot and shopping online for items that turned up in a search of his home after his arrest.
“He’s setting up a chemical lab in his bedroom,” Mr. Bove said, matching the purchases to where the materials were discovered at the various crime scenes.
Mr. Bove replayed a video of Mr. Rahimi setting off a flaming device in his backyard two days before the Chelsea bombing. “Look at the smile on his face,” he said.
Mr. Rahimi’s travels the day of the bombing began shortly before 5 a.m., when he left his home carrying bags of bombs that were so heavy, prosecutors said, he had to make two trips. The first partially exploded a few hours later, in Seaside Park, N.J., at the finish line of a charity race that had started late.
Some 45 videos traced his journey that day, arriving in Manhattan at Penn Station carrying two duffels and a backpack. Commuters flowed past him without notice. Outside Penn, he stopped briefly, and Mr. Bove explained why: The timers on his bombs were already set, and he was ahead of schedule. To set them too early would be to risk their discovery. He swapped the duffels for two rolling suitcases, walking the 10 blocks to Chelsea and stopping at West 23rd Street.
There he sat, for 20 minutes, on the steps of a church as people passed on a warm Saturday night. He rose and veered in the street at around 8 p.m., then walked past the same cameras that recorded him arriving earlier, but this time, he was going the other direction, pulling only one suitcase.
When the bomb on West 23rd Street exploded at about 8:30 p.m., Mr. Rahimi was leaving the second suitcase on West 27th Street. The timer on the second bomb, a pressure cooker packed with shrapnel, was set for 9 p.m. But two men passing by spotted the suitcase and stopped, opening it and removing the cooker, and in doing so, unknowingly disconnecting a wire in the bomb. They left with the empty suitcase.
It was 8:51 p.m. “This is one of the absolute miracles in evidence at this trial,” Mr. Bove said. An F.B.I. agent testified on Wednesday that the explosive in the pressure cooker could go off by jostling the device.
The following day, Mr. Rahimi returned to New Jersey, leaving a backpack with six pipe bombs at the train station. It was found, and when a police robot was opening one of the bombs, it exploded.
Mr. Rahimi’s fingerprints and D.N.A. were found on several bombs. He is charged with eight counts of using weapons of mass destruction and bombing a place of public use. He faces a mandatory sentence of life in prison if convicted of either of two counts in the indictment that charge use of a destructive device in furtherance of a crime of violence.
He sat impassively on Thursday, as he has throughout the trial, watching image after image of himself on a screen before him.