FILE - In this July 11, 2014 file photo, Valery Seleznev, a prominent Russian lawmaker and the father of Roman Seleznev who was arrested on bank fraud and other charges earlier this week in the United States, speaks to the media during a news conference in Moscow, Russia. Federal prosecutors want Roman Seleznev, who was convicted of hacking into U.S. businesses to steal credit card data, to be sentenced to 30 years in prison and ordered to pay $170 million in restitution. The sentencing hearing Friday, April 21, 2017, in U.S. District Court in Seattle is expected to last several hours. (AP Photo/Alexander Zemlianichenko, File)

SEATTLE (AP) — A federal judge on Friday handed down the longest sentence ever imposed in the U.S. for a cybercrime case to the son of a member of the Russian Parliament convicted of hacking into more than 500 U.S. businesses and stealing millions of credit card numbers, which he then sold on special websites.

Roman Seleznev was sentenced to 27 years in prison and ordered to pay nearly $170 million in restitution to the business and banks that were the victims of his multiyear scheme.

Prior to his sentencing, Seleznev asked U.S. District Judge Richard Jones for leniency. He apologized to his victims and said he was remorseful for his crimes, but he urged the judge to consider his medical problems, the result of being caught in a terrorist bombing in 2011, in deciding his prison term.

“I plead, pray and beg your honor for mercy,” he said.

But Jones told Seleznev that the bombing in Morroco “was an invitation to right your wrongs and recognize you were given a second chance in life.” But instead, Jones said Seleznev “amassed a fortune” at the expense of hundreds of small business.

“You were driven by one goal: greed,” Jones said.

After sentencing, Seleznev lawyer Igor Litvak read a hand-written statement from his client that said the long sentence was a political prosecution at a time of strained U.S.-Russian relations.

“This decision made by the United States government clearly demonstrates to the entire world that I’m a political prisoner,” Seleznev wrote. “I was kidnapped by the U.S. Now they want to send a message to the world using me as a pawn. This message that the U.S. is sending today is not the right way to show Vladimar Putin of Russia, or any government in this world how justice works in a democracy.”

He said he’s a citizen of the Russian Federation and he said he wanted to send a message to that government: “Please help me. I beg you.”

U.S. Attorney Annette Hayes said Seleznev’s statement was “troubling.” He told the judge that he accepted responsibility and then sent his lawyer out claiming the case was political, she said.

“He was treated with due process all along the way just as any U.S. citizen would have been,” she said.

Seleznev was first indicted in 2011 on 29 felony charges and captured in 2014. U.S. Secret Service agents, with the help of local police, arrested Seleznev in the Maldives as he and his girlfriend arrived at an airport on their way back to Russia. The agents flew him to Guam, where he made his first court appearance, and then to Seattle, where he was placed in federal custody.

The indictment grew to 40 counts in October 2014, and his trial was held last August. A jury found him guilty on 38 charges, including nine counts of hacking and 10 counts of wire fraud.

“This is truly an unprecedented prosecution,” Deputy U.S. Attorney Norman Barbosa told the judge before sentencing.

For 15 years, Seleznev broke into the payment systems of hundreds of businesses. He had more than 2.9 million unique credit card numbers in his possession when he was arrested. His thefts resulted in about $170 million in business losses.

Seleznev was “living like a mob boss” and spent money on fast cars, expensive boats and luxury trips around the world, he said.

Prosecutors asked for a 30-year sentence to send a message to hackers around the world.

“Never before has a criminal engaged in computer fraud of this magnitude been identified, captured and convicted by an American jury,” prosecutors told the judge in a presentence memo.

Litvak urged the judge to consider Seleznev’s life story in his decision.

Seleznev’s parents divorced when he was 2; his alcoholic mother died when he was 17; he suffered a severe head injury in a terrorist bombing in Morocco in 2011, causing his doctors to say he may not recover; and his wife divorced him while he was in a coma, Litvak told the judge.

Seleznev continues to suffer after-effects from the bombing, including seizures, Litvak said.

To prove his commitment to helping fight cybercrime, Seleznev recently arranged to give the U.S. government four of his laptops and six flash drives, and he has met with officials to discuss hacker activities, Litvak said.