Eucadoran President Jaime Roldos, his defense minister and their wives were killed in a plane crash yesterday near the Andean nation's disputed border with Peru, the government announced in Quito.

Roldos, at 40 the youngest president in South America and one of the few to be democratically elected, was immediately succeeded by Vice President Osvaldo Hurtado, 41, a Christian Democrat who is to serve out the remaining three years of Roldos' five-year term.

The Eucadoran first family was flying with the defense minister, Gen. Mario Subia, and two colonels to ceremonies marking the 1822 Battle of Pichincha, near the Peruvian border, that won Eucador's independence from Spain.

News service reports from Eucador said there was also three crew aboard the plane. There were no survivors. The Ecuadoran government announced that the accident occurred near the village of Guachala, about 300 miles south of Quito. The cause of the crash was unknown.

The election of Roldos three years ago was viewed as a clear victory also of the Carter administration's effort to revive democratic rule in military-dominated South America. Jimmy Carer personally followed the progress of the military's return to barracks, and he sent Rosalynn to Roldos' inauguration in August 1979.

An enduring difficulty for Roldos' presidency, overshadowing even a sharp border conflict with Peru in January, was his strained relationship with his party's populist strongman -- and his father-in-law -- Assad Bucaram. Roldos was seen initially in the 1979 elections as a stand-in for Bucaram, whom the military kept out of the race by a stratagem.

Roldos, on taking office, refused to bend to the demands of Bucaram despite having been his understudy. The resultinig battles for the loyalty of the party's legislators complicated Roldos' efforts to modernize Eucador.

Addressing the press club in Washington a month before his inauguration, Roldos said democracy had been only a formality in Eucador but now "we are setting out toward a true democracy." He quoted the 19th century explorer Alexander von Humboldt's description of Eucador, with its considerable resources and difficulty in reaping them, as "a begger sitting on a sack of gold." Roldos, who visited Carter at the White House during that visit, vowed to help distribute the gold more evenly.

Roldos' wife Marta, 39, like him a lawyer, took up the political activism of her father, Burcaram, to an extent still rare in the largely male-dominated politics of the Andes.

The election of Roldos was soon followed by a return to democracy in neighboring Peru, where the president that the military overthrew in 1968, Fernado Belaunde Terry, was reelected. It was doubly embarrassing, therefore, when the two resurgent democracies began shooting at each other along an undemarcated section of their mountainous border.

Peru insisted that Ecuadoran troops invaded, hinting that Roldos might have sought a foreign diversion because of difficulties with Bucaram at home. Roldos said Peru had attacked a village clearly with Ecuador. The dispute activated a 1942 treaty whose guarantors, including the United States, negotiated a cese-fire that is now holding after initial difficulties. s

The border dispute had a severe impact on the Andean Pact, a effort at establishing a common market among Ecuador, Peru, Colombia, Venezuela and Bolivia.

Through initiatives of Roldos, the Andean Pact had departed from its traditional concentration on economic issues to take diplomatic initiatives in favor of democratic rule. The first such effort came in a move to hasten the exit of dictator Anastasio Somoza from Nicaragua, followed by a failing attempt to establish civilian rule in Bolivia.

Roldos' difficulties were not only political but economic. Although Ecuador is an exporter of oil and a member of OPEC, its production was never on a grand scale and has been shrinking in recent years. Nevertheless his party, the Concentration of Popular Forces, is broadly credited with initial successes in modernizing the small and constricted economy and initiating broader development of resources.