An Indian man who came to the United States to study was sentenced Monday to more than 27 years in prison for sending funds to Al Qaeda and plotting to kill the federal judge in his trial.

Yahya Farooq Mohammad, 39, was one of four men including his brother arrested in September 2015 and charged for sending $22,000 to US-born cleric Anwar Al-Awlaki, a leader of Yemen-based Al Qaeda on the Arabian Peninsula (AQAP).

Mohammad and two others travelled to Yemen in 2009 in hopes of hand-delivering the money to Awlaki, one of the most influential recruiters for Al Qaeda. They did not meet him, but had the money delivered to him by a third party.

After they were arrested in 2015, Mohammad also tried to hire someone to kill the judge in his case, the Justice Department said.

“He threatened the safety of our citizens, a judge and the independent judiciary. Now he is being held accountable,” said US Attorney Justin Herdman.

Mohammad came to the United States to study at Ohio State University in 2002. He married a US citizen in 2008.

A year after the his arrest, Mohammad offered another inmate in the Lucas County, Ohio jail $15,000 to kidnap and kill US District Judge Jack Zouhary.

The inmate connected Mohammad with an assassin who was in fact an undercover FBI agent. A member of Mohammad's family paid a $1,000 down payment to the “assassin.”

He pleaded guilty in US federal court in Toledo, Ohio to one count of conspiracy to provide and conceal material support or resources to terrorists and one count of solicitation to commit a crime of violence.

In a plea deal, Mohammad agreed to 27.5 years in federal prison, after which he will be deported.

The three other men arrested still face trial. All pleaded not guilty to the charges.