Boston Marathon bomber Dzhokhar Tsarnaev was sentenced to death Friday for the 2013 terror attack — and he reacted by flashing a wry grin and pointing his fingers like a gunslinger.

The same jury that found him guilty on April 8 of all 30 counts — including murder and use of a weapon of mass destruction — announced its verdict in a packed but silent federal courtroom in Boston at about 3:15 p.m. after deliberating for only 14 hours.

The 21-year-old self-radicalized Muslim — who with his brother, Tamerlan, planted two bombs at the marathon’s finish line, killing three and injuring 260 — showed little emotion as his fate was read.

But the remorseless jihadi, in a blazer and a collared shirt, smiled and pointed his index fingers as if firing pistols when US Marshals led him away, a witness told CNN.

US Attorney Carmen Ortiz lauded the jury, calling it a “fair and just verdict,” and said the case showcased the fairness of the US justice system.

“Even the worst of the worst deserve a fair trial and due process of law,” Ortiz said outside the courthouse.

She defended the government’s decision to seek the death penalty, citing the heinous nature of the attack and Tsarnaev’s lack of remorse and depraved indifference to human life and suffering.

“It was a political crime designed to intimidate and coerce the United States. Dzhokhar Tsarnaev will pay with his life,’’ Ortiz said. “Our thoughts should turn away from the Tsarnaev brothers for good.”

His lawyers – who argued that Dzhokhar was merely under the spell of his violent brother – will appeal. They left court without commenting.

Boston Mayor Marty Walsh said he hoped the verdict provided “a small measure of closure” for the families of the dead and injured, 17 of whom lost limbs.

“We will forever remember and honor those who lost their lives and were affected by those senseless acts of violence on our city,” he said.

US Attorney General Loretta Lynch called the punishment fitting.

“No verdict can heal the souls of those who lost loved ones, nor the minds and bodies of those who suffered life-changing injuries from this cowardly attack. But the ultimate penalty is a fitting punishment for this horrific crime,” Lynch said.

Boston Police Commissioner William Evans said, “We’ve sent a strong message that we’re not going to tolerate terrorism in our country.”

Tsarnaev’s father, Anzor Tsarnaev, an ethnic Chechen, was indignant.

“We will fight. We will fight. We will fight until the end,” he told ABC News, which had reached him in the Russian region of Dagestan.

Federal Judge George O’Toole Jr. will impose the sentence at a hearing in which Tsarnaev’s victims will be allowed to confront the madman. He will also have the right to speak after not taking the stand during his trial.

After the verdict was read, O’Toole told jurors, at least three of whom were wiping away tears, “You should be justly proud of your service in this case,” The Boston Globe reported.

The seven-woman, five-man jury decided Tsarnaev should be killed on the counts related to the deaths of Boston University grad student Lingzi Lu, 23, and 8-year-old Martin Richard, the attack’s youngest victim.

Tsarnaev was directly responsible for their murders, having placed the backpack pressure-cooker bomb that killed them.

The jurors chose not to sentence Tsarnaev to death for the second bomb, which was placed by his brother and killed Krystle Campbell, 28, of Arlington, Va.

They also did not impose the death penalty for the murder of MIT Police Officer Sean Collier, whom the defense had argued was shot by Tamerlan.

Only three jurors bought the defense’s argument that Tsarnaev had been influenced by his older brother.

The panel unanimously agreed Tsarnaev — who often clowned in court during the penalty phase of his trial — showed no remorse.

The appeals process, meanwhile, could take years.

The US Court of Appeals for the 1st Circuit in Boston will review Tsarnaev’s case, which could wind up before the US Supreme Court.

He will remain jailed in Massachusetts until after he’s formally sentenced, and it is expected he will be taken to the federal pen in Terre Haute, Ind., where he would become the youngest person on federal death row.

Tamerlan Tsarnaev was killed April 19, 2013, following a shootout with Watertown, Mass., cops, who shot him before he was run over by an SUV driven by a fleeing Dzhokhar.

Dzhokhar was captured 17 hours later, wounded and hiding in a boat in a yard.

Tsarnaev scribbled a explanation for his barbarism in the boat, saying the United States was “killing our innocent civilians. We Muslims are one body, you hurt one you hurt us all.”

Prosecutor Steven Mellin, in his closing argument, quoted a line from the note.

“Now I don’t like killing innocent people, but in this case, it is allowed,” he read.

The brothers were caught on surveillance video carrying the shrapnel-filled bombs as runners neared the marathon’s finish line in Boston’s Back Bay and as thousands of spectators cheered on the sidewalks.

Prosecutors said the Tsarnaevs, who still had a cache of pipe bombs and another pressure-cooker bomb after the attack, were planning to flee to New York City to carry out more terror attacks.