The U.S. government owes nothing to a New York man, now in prison for aiding al Qaeda, who sought $7 million in damages for alleged medical malpractice that occurred after he was taken into custody, a federal judge ruled on Thursday.

U.S. District Judge Gregory Woods in Manhattan said Wesam El-Hanafi, 40, presented no evidence at his malpractice trial showing that the prison system failed to diagnose and treat a blood clot in his leg in a timely fashion.

"The plaintiff did not meet his legal burden of establishing any breach of duty of care or that such a breach was the proximate cause to his injury," Woods said in court.

El-Hanafi's lawyer did not respond to requests for comment.

El-Hanafi, a Brooklyn-born man who U.S. prosecutors say facilitated surveillance of the New York Stock Exchange, contended that his symptoms began shortly after his arrest in Dubai in 2010.

RELATED: US warily eyes New Year's Eve threats

In a lawsuit filed in 2013, El-Hanafi said after his arrest, police in Abu Dhabi shackled his feet during his detention, and that on a 16-hour flight to Washington his leg use was discouraged.

His lawyer, Jake Harper, argued that after departing the airplane, El-Hanafi began experiencing pain in his right calf, initial symptoms of a blood clot condition called deep vein thrombosis.

Despite consistent complaints about feeling pain, Harper said El-Hanafi's condition went undiagnosed until being treated at a New York hospital in 2011, when ultrasounds were taken.

But lawyers under Manhattan U.S. Attorney Preet Bharara argued those same ultrasounds and later ones showed the condition was in early stages at that time. They called El-Hanafi's condition hereditary and likely not preventable.

RELATED:  Anonymous to ISIS: 'War is declared, get prepared'

El-Hanafi, who sought $7 million in damages, pleaded guilty in 2010 to charges including that he provided material support to terrorists and was sentenced in January 2015 to 15 years in prison.

He worked as an information technology employee for Lehman Brothers at the bank's Dubai offices until his arrest.

Prosecutors said El-Hanafi traveled to Yemen in 2008 and swore an allegiance to al Qaeda.

He then used his expertise to help advise al Qaeda contacts how to avoid detection while communicating online, and also sent money and equipment to al Qaeda contacts, prosecutors said.

At the direction of Yemen-based contacts, El-Hanafi also assigned an associate to perform surveillance of U.S. locations, including the New York Stock Exchange, as potential attack targets, prosecutors said.