Two men convicted of terrorist plots have lost their argument that being sentenced the same day as the Boston Marathon bombings may have worked against them.

U.S. District Judge Dickinson Debevoise ruled Tuesday that news of the Boston attacks "did not and could not have affected the Defendants’ sentence."

Mohamed Alessa, 23, of North Bergen, and Carlos Almonte, 27, of Elmwood Park, pleaded guilty in March 2011 to conspiracy to travel to Somalia for purposes of joining terrorist group al-Shabaab and carry out murders on the organization’s behalf.

In voluminous presentence papers and at the day-long hearing, prosecutors urged the lowest guideline sentence of 30 years, while each defendant argued for a 15-year term, which would be a variance from sentencing guidelines.

Debevoise ultimately sentenced Alessa to 22 years’ imprisonment and Almonte to 20 years, plus lifetime supervised release for both men.

The next day, Almonte’s lawyer, James Patton, contacted Debevoise and said he was concerned that news of the bombings swayed the judge. He mentioned a note mysteriously handed to Debevoise by a court staffer during the hearing.

In a response letter that Thursday, Debevoise explained that the note had to do with his wife’s admission to Overlook Hospital with a mild case of pneumonia but acknowledged learning of the bombings before imposing the sentences.

On April 29, Alessa and Almonte made formal motions for reconsideration of sentence, a new sentencing hearing or a hearing on the motion at issue.

Prosecutors kept evidence of the bombings from the defense and used it to abruptly reshape their argument to play up threats of domestic terrorist attacks in U.S. cities, the defendants claimed.

Alessa and Almonte emphasized another note that changed hands in the courtroom on the day of the sentencing — one passed from a federal agent to Assistant U.S. Attorney L. Judson Welle at counsel’s table, informing him of the Boston attacks. Welle in turn passed the note to fellow prosecutor Andrew Kogan, who was in the middle of his argument before Debevoise and paused to read it.

Debevoise, in denying the motions, said he had based the sentences largely on the prehearing papers and thus his "discretion in this case was neither tainted or impeded."

Debevoise noted that defense counsel made their motions before transcripts were available, and their "recollection was faulty in part." Welle had already talked about the dangers posed to the New York metropolitan area — to emphasize deterrence — well before news of the bombings broke during Kogan’s argument, the judge said.

Kogan continued on the same course of argument after reading the note — pointing up the defendants’ histories and violent nature, Debevoise said.

Debevoise himself didn’t learn about the bombings until a law clerk informed him during a recess just before he delivered sentencing.

When he finally did rule, he drew from a 43-page, previously prepared statement of reasons, he said.

"The events in Boston had no effect upon either the Summary or the Statement," Debevoise wrote. "Both derived from the material that the parties had provided the Court long before April 15, 2013, as incorporated in their arguments at the sentencing hearing."

Also, there was good reason to argue domestic terrorism because Alessa and Almonte posed that danger, Debevoise said, referring to a report that was "full of conversations in which one or the other or both Defendants looked forward to killing in the United States non-Muslims or Muslims who disagreed with them."

Debevoise said it was already his view that the 22-year and 20-year sentences served the purpose of deterrence. "That was [the court's] conclusion before the Boston bombing and before the Government argued at the sentencing hearing for a more severe sentence and against a variance," he said.

Alessa and Almonte waived their right to challenge any sentence of 30 years or less, and judges can’t modify sentences once imposed except under specified circumstances not present in this case, Debevoise noted.

U.S. Attorney’s Office spokeswoman Rebekah Carmichael declines comment on the ruling. She previously said that it was not unusual that Kogan, as head of the office’s national security unit, would be promptly notified of an attack.

Alessa’s lawyer, New York solo Stanley Cohen, did not return a call Tuesday but previously said he’d likely appeal any adverse ruling by Debevoise.

Patton, of Woolcock Patton in Livingston, did not return a call.

David Gialanella is a reporter for the New Jersey Law Journal, a Legal affiliate.