The US District Judge Harry D Leinenweber gave his order after hearing from both the government attorney and those of 52-year-old Rana, during which the two argued on the length of imprisonment.
The last minute arguments lasted for more than an hour and a half. The Defence had sought a lighter sentence of about nine years citing Rana's poor health while the Prosecution wanted a 30-year jail term.
"Based upon presiding over the trial and reading over the material that has been provided to me, we have on one hand a very intelligent person capable and willing to provide assistance to many people," court said.
"What is difficult to understand how that kind of person is sucked into a ghastly plot that was proposed to go into the private office of a newspaper. We find that Rana got involved in this action which would have provided death and injury to a number of people. Fortunately, it was stopped prior to being carried out," the judge said.
He added, "It seems to me that people who are determined to carry out terrorist activity really do not care about what is going to happen to them. As long as Rana is in custody, he is personally deterred from any personal such activity. Providing a long sentence would make sure that Rana does not get involved in any kind of terrorist activity in the future."