Federal prosecutors have yet to capture or convict the foreign computer criminals believed to be behind the hackings of big retailers like Target and Neiman Marcus.

But in a rare, major victory in Federal District Court in Seattle, the Justice Department netted a big player in a Russian digital crime ring who is the son of a prominent Russian lawmaker. And now, law enforcement officials have made an example of him.

On Friday, a judge sentenced Roman Valerevich Seleznev, 32, to 27 years in prison — the longest sentence handed down for hacking-related charges in the United States — for running a vast credit card and identity theft operation from his homes in Bali, Indonesia, and Vladivostok, Russia, and for selling millions of credit card numbers on the black market. Federal prosecutors had asked for a 30-year sentence.

Mr. Seleznev’s schemes led to the theft and resale of more than two million credit card numbers, resulting in losses of at least $170 million. That total could grow to billions of dollars, according to court documents. Among Mr. Seleznev’s victims were 3,700 financial institutions and 500 businesses around the world, including several restaurants in the Seattle area.