PHNOM PENH, Cambodia — The highest-ranking surviving Khmer Rouge leader, accused in the deaths of 1.7 million people, defended himself on Tuesday by casting his actions as part of a patriotic struggle to keep Vietnam from annexing Cambodia and exterminating ethnic Cambodians.

Presenting what could have been the condensed version of a political address from his days as the Khmer Rouge’s chief ideologue in the 1970s, the defendant, Nuon Chea, 85, spoke of threats from Vietnamese agents as a justification for the purges that led to the torture and killings that defined the Khmer Rouge regime.

It was the first time a Khmer Rouge leader offered a detailed defense in court for the atrocities committed by the radical Communist regime from 1975 to 1979.

“I have been given an opportunity today that I have been waiting for for so long, and that is to explain to my beloved Cambodian people and their Khmer children the events that occurred in Cambodian history,” Mr. Nuon Chea said.