Adm. Jose Baptista Pinheiro de Azevedo, 66, a career officer in the Portuguese Navy who served as premier during the country's first democratic elections in 48 years, died Aug. 10 at the Lisbon naval hospital following a heart attack.

Born in Luanda, Angola, then called Portuguese West Africa, Adm. Pinheiro de Azevedo entered Lisbon's naval academy at age 17.

His only break from naval life came with his appointment as premier in a provisional government that took office five months after a military coup on April 25, 1974. He headed the government from Sept. 19, 1975 to June 1976.

The coup ousted the authoritarian government headed by Premier Marcelo Caetano, who had come to power following the retirement in 1968 of Premier Antonio de Oliveira Salazar.

Salazar had ruled the country since 1932. A military revolt in 1926 had prepared the way for the regime that he came to personify.

The coup of April 1974 was brought on in part by the continuing drain on Portugal's resources because of its effort to hold on to its African colonies, where independence movements were flourishing, and by Caetano's repressive policies at home.

Adm. Pinheiro de Avezedo became a member of the ruling junta of National Salvation, a coalition of coup leaders set up to administer the country. He later was a member of the Council of the Revolution, the country's political watchdog, which was dissolved last year.

He was appointed premier by the military to moderate the country's shift to the left under Premier Vasco Goncalves, a colonel who held the post briefly after the coup. After the admiral took office, leftists staged nationwide strikes, blockading his official residence in November 1975 for two days.

But Adm. Pinheiro de Azevedo stood by the military's promise of a return to civilian rule, overseeing the 1976 balloting for a constituent assembly that was Portugal's first democratic election since 1926.

Adm. Pinheiro de Azevedo later ran for the presidency but had to abandon the effort after suffering a heart attack during the campaign. Antonio Ramalho Eanes was elected president.