BRUSSELS—The World Trade Organization handed an important victory to China, ruling that the U.S. illegally imposed both antidumping and antisubsidy duties on some Chinese exports in 2007.

The trade body's surprise decision sets a precedent in limiting the ability of China's trading partners to impose punitive duties on its exports.

China,...