BIRMINGHAM, Ala. — An Uzbek man who came to America pursuing an Ivy League medical degree but wound up working seven days a week at a mall kiosk in Alabama was sentenced to more than 15 years in prison Friday for plotting to kill President Barack Obama.

U.S. District Judge Abdul K. Kallon imposed the sentence on Ulugbek Kodirov, 22. He had faced up to 30 years in prison.

Written and oral court pleadings showed Kodirov, whose parents are professionals who worked for the government in his native Uzbekistan, was accepted to study medicine at Columbia University in New York but never enrolled because his English was too poor.

He later moved to Alabama for a job and worked at the massive Riverchase Galleria in suburban Hoover, where the defense said he used his laptop and free wi-fi service to connect with extremists who turned him against the United States.

Wearing an orange jail uniforms and leg chains, Kodirov apologized in halting English.

"I am truly sorry for every mistake that I have done," he told the judge.

Defense attorney Lance Bell argued that Kodirov – who had the equivalent of a nursing degree in his native country before he moved to New York – had accepted responsibility for his actions and was trying to straighten out his life. He said Kodirov wasn't "a big, bad terrorist."

"I'm not calling him a victim, but he's a victim to a degree of social media," Bell said.

Assistant U.S. Attorney Michael Whisonant said Kodirov would have tried to kill Obama and a foreign group would have taken credit had he not been arrested a year ago.

"This case is an example of how our youth can be radicalized by the propaganda and lies on the Internet," Whisonant told the judge.

Kodirov pleaded guilty in February to threatening to kill the president, providing material support to terrorism and unlawfully possessing a firearm. He said he came up with the plan to kill Obama as he campaigned for re-election after communicating over the Internet with a man he believed to be a member of an Uzbek Islamic group the United States classifies as a terrorist organization.

Members of the Islamic community in Birmingham helped in the case against Kodirov, prosecutors said.

A complaint said Kodirov contacted an unidentified person trying to buy weapons in early July 2011, and that person became a confidential source for the government. Accompanied by the witness, Kodirov purchased a Sendra M115A1 automatic rifle from an undercover agent at a Birmingham-area motel and made a final threat against the president, authorities said. The agent also gave Kodirov four hand grenades with the powder removed.

Authorities said Kodirov was in the country illegally because he obtained a student visa but never enrolled in school. He faces deportation after his release; Bell said he could be killed when he returns home for his actions.

The defense argued Kodirov was lonely and turned to the Internet for entertainment and companionship after moving to Alabama, where few people speak his native language. He was able to communicate with other believers in Islam over his laptop computer, they said.

A sentencing memorandum submitted by his defense attorney said Kodirov began viewing jihadist websites and YouTube videos. After communicating with Muslim men, "came to the belief that Americans were killing his people in cold blood."

"Ulugbek then developed an anti-American attitude along with losing trust in Americans," said the document. Kodirov's beliefs changed after his arrest when he learned when he learned stories he had been told were lies, Bell argued.

Located in central Asia, Uzbekistan and was once part of the former Soviet Union. It is slightly larger than California and the vast majority of its population is Muslim.

Islamic terrorists have been linked to sporadic violence in the country for more than a decade, according to the State Department.

___

Follow Reeves at: http://twitter.com/Jay_Reeves

Also on HuffPost:

Loading Slideshow...
  • Birth Certificate -- "Born In The USA"

    <a href="http://www.huffingtonpost.com/2011/04/27/obama-birth-certificate-r_n_854248.html" target="_hplink"><strong>(April 27, 2011) --</strong></a> The White House <a href="http://www.whitehouse.gov/blog/2011/04/27/president-obamas-long-form-birth-certificate" target="_hplink">released</a> President Barack Obama's "long form" birth certificate, adding documentation to a longstanding discussion over his ability to serve as commander in chief. "We do not have time for this kind of silliness," Obama said. "We have better stuff to do. I have got better stuff to do. We have got big problems to solve." (JEWEL SAMAD/AFP/Getty Images)

  • Osama Bin Laden Killed -- "Tonight, Tonight"

    <a href="http://www.huffingtonpost.com/2011/05/01/osama-bin-laden-dead-killed_n_856091.html" target="_hplink"><strong>(May 1, 2011)</strong></a> -- In a televised address to the nation, Obama announces that Osama bin Laden is dead. His death was the result of a U.S. operation launched today in Abbottabad, Pakistan, against a compound where bin Laden was believed to be hiding. "[T]oday's achievement is a testament to the greatness of our country and the determination of the American people," Obama proclaimed. (Photo by Pete Souza/The White House via Getty Images)

  • Debt Ceiling Deal -- "Gold On The Ceiling"

    <a href="http://www.huffingtonpost.com/2011/08/02/obama-debt-ceiling-deal-jobs_n_916285.html" target="_hplink"><strong>(Aug. 2, 2011) --</strong></a> After the Senate passed a bill to raise the debt limit, Obama pleaded with Congress to shift their attention to jobs. "I will urge them to immediately take some steps -- bipartisan, common-sense steps -- that will make a difference; that will create a climate where businesses can hire, where folks have more money in their pockets to spend, where people who are out of work can find good jobs," he said. (Photo by Brendan Smialowski/Getty Images)

  • Don't Ask Don't Tell -- "Don't Stop Believin'"

    <a href="http://www.huffingtonpost.com/2011/09/20/barack-obama-dont-ask-dont-tell-repeal-statement_n_971662.html" target="_hplink"><strong>(Sept. 20, 2011) --</strong></a> As the ban on gays serving in the military came to an end, Obama hailed the fresh start, celebrating the fact that "patriotic Americans in uniform will no longer have to lie about who they are in order to serve the country they love." (Photo by Brendan Hoffman/Getty Images)

  • Iraq War To End -- "Homeward Bound"

    <a href="http://www.huffingtonpost.com/2011/10/21/obama-iraq-troop-withdrawal_n_1024108.html" target="_hplink"><strong>(Oct. 21, 2011) --</strong></a> Obama announced that all U.S. troops will be out of Iraq by 2011, fulfilling a promise that dated back to his campaign. "As a candidate for president, I pledged to bring the war in Iraq to a responsible end," Obama said. "So today I can report that, as promised, the rest of our troops in Iraq will come home by the end of the year." (Photo credit should read JIM WATSON/AFP/Getty Images)

  • Singing Al Green's "Let's Stay Together"

    <a href="http://www.huffingtonpost.com/2012/01/20/obama-al-green-apollo-theater_n_1218070.html" target="_hplink"><strong>(Jan. 20, 2012) --</strong></a> During a fundraiser at Harlem's historic Apollo Theater, Obama delivered a memorable musical message to his donors. With Rev. Al Green in attendance, Obama sang part of Green's hit song "Let's Stay Together," drawing strong applause from the crowd.

  • Singing Robert Johnson's "Sweet Home Chicago"

    <a href="http://www.huffingtonpost.com/2012/02/21/obama-sings-sweet-home-chicago_n_1292576.html" target="_hplink"><strong>(Feb. 21, 2012) --</strong></a> Days after his Al Green rendition, Obama flexed his vocal chords again with a hometown favorite. The East Room of the White House had its blues fix filled when the president started swinging "Sweet Home Chicago."

  • Gay Marriage -- "Can't Fight This Feeling"

    <a href="http://www.huffingtonpost.com/2012/05/09/obama-gay-marriage_n_1503245.html" target="_hplink"><strong>(May 9, 2012) --</strong></a> In a sit-down interview with ABC's Robin Roberts, Obama explained his evolution on the issue, affirming his support for gay marriage. "[A]t a certain point I've just concluded that for me personally it is important for me to go ahead and affirm that I think same sex couples should be able to get married," he said.

  • Immigration -- "With Arms Wide Open"

    <a href="http://www.huffingtonpost.com/2012/06/15/obama-immigration-order-deportation-dream-act_n_1599658.html " target="_hplink"><strong>(June 15, 2012) --</strong></a> The Obama administration addressed America's immigration issue, announcing that it will halt deportations and grant work permits to young individuals eligible for Dream-Act benefits. "They pledge allegiance to our flag," Obama said. "They are Americans in their hearts, in their minds, in every single way but one: on paper."(Photo by Alex Wong/Getty Images)

  • Health Care Reform -- "Beautiful Day"

    <a href="http://www.huffingtonpost.com/2012/06/28/supreme-court-health-care-decision_n_1585131.html" target="_hplink"><strong>(June 28, 2012) --</strong></a> After weeks of speculation that Obama's signature piece of legislation could be overturned, the Supreme Court ruled that the Affordable Care Act's individual mandate is constitutional. "It should be pretty clear that I didn't do this because it's good politics," <a href="http://www.huffingtonpost.com/2012/06/28/obama-health-care-ruling_n_1632953.html" target="_hplink">Obama said</a>. "I did it because it's good for the country." (Photo by Alex Wong/Getty Images)