Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The man charged with the terror attack near the finish line of the 2013 Boston Marathon went on trial Monday in a federal courthouse less than two miles from where two bombs, concealed in backpacks, exploded with devastating force.

Dzhokhar Tsarnaev, in khakis and a dark shirt with sleeves rolled up, watched as Judge George A. O’Toole Jr. addressed batches of prospective jurors and sent them off to fill out questionnaires. Jury selection got underway after defense lawyers lost repeated bids to have the trial delayed or moved out of Boston.

As Tsarnaev was led into court for an afternoon session, he appeared to take his seat with a smirk. Prospective jurors glanced at each other and appeared surprised to see him.

Tsarnaev, 21, is charged with 30 criminal counts in the April 2013 bombings, which killed three people and injured 260 others, and in the murder of an MIT campus police officer, Sean Collier, a few days after the bomb attack.

The judge summoned 3,000 people to the federal courthouse on Boston’s inner harbor, an unusually large jury pool. In the first phase of jury selection, at least 1,200 are expected to fill out questionnaires over three days this week.

O’Toole said in an order that individual questioning of prospective jurors would begin Jan. 15. He said in court that he expects opening statements around Jan. 26 and that the trial will last three or four months.

Tsarnaev has pleaded not guilty. His older brother, Tamerlan, also accused in the crimes, died in a shootout with police.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Since shortly after the bombings, the younger Tsarnaev has been held at Federal Medical Center Devens, a prison facility on a decommissioned U.S. Army base about 40 miles west of Boston.

Because the government has said it will seek the death penalty if Tsarnaev is convicted, potential jurors will be questioned with the goal of seating a jury that is, as federal law puts it, "death-qualified."

"Two types of jurors must be excluded," said Professor Ira Robbins of American University's Washington College of Law. "The judge will seek to eliminate those who are categorically opposed to the death penalty in all cases and those who believe that if there's a conviction for capital murder, they must impose the death penalty."

The city pulled together after the bombings, a spirit that became known as Boston Strong, to aid the victims and refuse to be defeated. Last year's marathon drew a crowd of 1 million people to watch — twice the usual number.

"He's going to die in prison one way or the other if he's convicted. So this really is a ceremony that doesn't make sense."

But now, Marty Walsh, Boston's mayor since last year, says most people in his city want the bombing trial to be over.

"People just feel that they know what happened on that day," Walsh said. "And I think a lot of people are saying, 'Let's move beyond this thing so the families can have some peace.'"

A former federal judge who now teaches at Harvard University said that she believes conducting a full trial is a mistake and that prosecutors should allow Tsarnaev to plead guilty and receive a sentence of life in prison.

Nancy Gertner argues that legal appeals would take years and that executions are on hold because of uncertainty about lethal drugs.

"He's going to be on death row for decades. There will be multiple appeals," Gertner said. "Looking at it realistically, he's going to die in prison one way or the other if he's convicted. So this really is a ceremony that doesn't make sense."

Under such a scenario, the judge would conduct a sentencing hearing, which Gertner said would give those most affected by the bombings a chance to speak: "It would enable the victims to have a platform to talk about the extraordinary pain that they endured, which is a different platform than would be at a trial."

If any such plea discussions have taken place, there is no public record of it, and Justice Department officials have refused to comment.

Jury selection may take a few weeks, and the entire trial may last as long as four months.