A Russian programmer who had been arrested in Spain in a high-profile case that pitted the U.S. against Russia on Friday pleaded not guilty to charges of running a vast network of computers for criminal purposes.

Pyotr Levashov, described by the U.S. Justice Department as one of the world’s most sophisticated hackers, is being held pending trial in Connecticut federal court, according to a court spokesman.

Mr....