CALL it academic arbitrage. Supap Kirtsaeng, a Thai student who earned a PhD in mathematics from the University of Southern California, made as much as $1.2m with some basic maths. He asked friends and family to ship him cheap textbooks from Thailand, which he sold for a handsome profit in America. The books were intended only for sale in Thailand, and Wiley, a publisher of some of the textbooks he sold, sued him for copyright infringement in September 2008 and won. Mr Kirtsaeng appealed, and the case made its way to America’s highest court.

On March 19th the Supreme Court ruled that American copyright law does not restrict goods produced abroad from being resold in America. The ruling widens the reach of the “first sale doctrine”, which gives copyright-holders control of their goods until their first sale; afterwards the purchaser can lend or peddle them for whatever price he chooses. Previously, the first-sale doctrine protected copyright-holders from their works being imported and resold without their permission. A retailer could legally sell a second-hand “Gone with the Wind” DVD, but could not buy it cheaply in Russia, bring it to America and sell it for a low price. With the Supreme Court’s ruling, that protection has been swept away.

Publishers, record labels, film studios and other content-owners are shocked. They have often sold the same product in poorer countries for less, knowing that it would not hurt their pricing power at home. Now it will. Big online retailers such as Amazon and eBay could start exploiting these pricing differences on a large scale. Ian Whittaker of Liberum Capital, a broker, thinks this ruling will really hurt academic publishers, such as Pearson (a part-owner of The Economist). They tend to sell identical books for eye-watering prices in America and much less in countries where people cannot afford those prices.

Publishers have already warned that they may have to turn the page on the old system of letting students in poor countries buy textbooks cheaply. “Some people are predicting a world where price discrimination will no longer be possible,” says Arti Rae, a professor of law at Duke University. Media companies could choose to stagger the release of films or books across countries, delaying the launch of titles in countries where they cannot fetch high prices. However, that may simply encourage piracy. Congress could intervene and rejig the Copyright Act of 1976, which established the first-sale doctrine. But that would require Washington to get its act together—a plotline so implausible that it would make J.K. Rowling blush.

In any case, an even bigger copyright issue is brewing. The Copyright Act was written before digital media became popular, and the first-sale doctrine does not apply to electronic wares. Should consumers have the right to lend and sell their music files and e-books, even though they do not wear out like their physical counterparts, or should content-producers retain the copyright? If consumers could legally resell their electronic media, it could wipe out the profits of many media firms. ReDigi, a firm that enables people to buy and sell second-hand electronic music files, was sued last year for copyright infringement by Capitol Records, a music label. A judge should rule on the case soon, but it may well be appealed all the way to the Supreme Court.