BUCHAREST, Romania — The highest court in Romania upheld a 20-year prison term on Wednesday for a 90-year-old former warden from the country’s repressive Communist past who had overseen brutal treatment of prisoners, including routine beatings and starvation.

The former warden, Alexandru Visinescu, convicted last July of murder and crimes against humanity for the deaths of 12 inmates in the Ramnicu Sarat prison, was unrepentant at the trial. He had appealed the sentence to the High Court of Cassation and Justice.

The case, the first brought against an official of the former Communist government in almost 25 years, was widely regarded as a test of the country’s willingness to confront that period.

From 1956 to 1963, Mr. Visinescu was the commander of Ramnicu Sarat, used to house many political prisoners and known for its harsh conditions.