SEOUL, South Korea — The Supreme Court in North Korea on Sunday sentenced one of the three Americans known to be held in the country to six years of hard labor for committing “hostile acts” against the North.

North Korea said the American, Matthew Todd Miller of Bakersfield, Calif., committed the crime while entering the country on a tourist visa in April, according to the official Korean Central News Agency.

The agency also carried photographs that showed Mr. Miller, who North Korean court records say is 25, in the defendant’s seat in the courtroom with his eyes downcast, and flanked by uniformed security officials. The news agency gave no further details of the trial.

But The Associated Press and The Choson Sinbo, a pro-North Korean newspaper in Japan, both of which were allowed to attend the trial, said that Mr. Miller was convicted on spy charges under Article 64 of the country’s criminal code.