Updated

A Vietnamese man was sentenced Friday to 40 years in prison by a judge who said she believed he plotted to carry out a suicide bombing at London's Heathrow Airport.

Still, U.S. District Judge Alison J. Nathan showed 33-year-old Minh Quang Pham a measure of leniency, too, noting that he had renounced all terrorism and said he was ashamed of having provided material support in 2011 to al-Qaida in the Arabian Peninsula.

She rejected a government request that Pham be sentenced to 50 years in prison, though she also said the 30 years in prison requested by the defense was insufficient.

Nathan said Pham deserved an "exceptionally severe sentence" after he became a trusted, skilled and dedicated resource for the terrorist group, lending his abilities as a graphic artist to Inspire magazine, a publication that the government has said was used by the brothers who carried out the deadly Boston Marathon bombing in April 2013 to learn how to create pressure-cooker bombs.

She said she believes the government's claims that Pham planned to carry out "a horrific suicide bombing" at Heathrow Airport after he returned to London in the summer of 2011.

Extradited from London in March 2015, Pham had pleaded guilty in January to terrorism charges, but he didn't agree that he intended to carry out the plot.

Prosecutors said Pham was directed during several months of training in Yemen by U.S.-born, extremist Islamic preacher and al-Qaida leader Anwar Al-Awlaki to detonate explosives in the arrivals area. Al-Awlaki was killed in a drone attack in Yemen in September 2011.

Pham cried briefly as he told the judge a long sentence under harsh prison conditions would keep him away from his family for decades.

He said he never intended to hurt anyone.

"I never committed an act of violence," he said. "I made a terrible mistake. I regret it very much."

In a letter to the judge before sentencing, Pham said he was renouncing "all acts of terrorism and all extreme ideology."

He also wrote that he would "personally condemn" the Sept. 11 attacks, saying they were "a shameful and provocative act."

The judge read aloud some of his statements renouncing terrorism as she announced the sentence, saying his decision to do so was a factor in her decision-making.

As Assistant U.S. Attorney Anna Skotko described why she believed a 50-year sentence was appropriate, the judge interrupted her to ask what she thought of Pham's contrition and claims to now renounce terrorism.

"We don't think they are credible," she said. "His actions speak louder than his words."

In arguing for leniency, defense attorney Bobbi Sternheim said Pham might have no country to return to after he finished his prison term since his citizenship in the United Kingdom was taken away. She pointed to her client, noting his slim build.

"He certainly is not the picture of al-Qaida," she said.