With the Carter administration watching intently, Peru's 6.4 million voters stood quietly in long lines today at schools, municipal buildings and even movie theaters to choose from among a bewildering array of 15 presidential and 3,284 congressional candidates in the first general elections here since 1963.

It has been 12 years since Gen. Juan Velasco Alvarado overthrew the last elected president, moderate reformist Fernando Belaunde Terry, now 67 -- who is expected by most political observers to win today.

The military is to hand over power July 28. The current president, Gen. Francisco Morales Bermudez, promised the return to elected government in 1975 when he overthrew Velasco in a palace coup. The move has been strongly supported by the Carter administration, which made clear that aid programs would be adversely affected if the military remained in power.

Despite rumors that some military factions still oppose a return to civilian rule, Morales Bermudez promised as recently as last week that the election results would be respected. With the economy in severe straits, the military as a whole has been anxious to relinquish power. If all goes as scheduled, Peru will become the third South American country in a year to trade military for civilian leadership.

This trend begun by Ecuador and Bolivia is central to the Carter administration's policy of encouraging human rights and democracy throughout Latin America. Previous administrations often sought to maintain established friendly governments even if they were dictatorships.

For two months, Peruvians have been bombarded by speeches, commercials and written propaganda as the 15 political coalitions sought to distinguish themselves from rivals of every political shading.

The two leading candidates have been Belaunde and Armando Villamueva, 64, head of the American Popular Revolutionary Alliance (APRA), a populist party that is the oldest and best organized in Peru.

Belaunde's principal campaign theme was that he would create 1 million news jobs within a year -- a power ful purpose in a country where one-fifth of the work force is unemployed. Inflation approaching 70 percent also has shrunk the purchasing power of the poor and middle classes.

In addition to his popular economic proposals, Belaunde was perceived as a statesman and proven leader in contrast to Villanueva, whose political career was largely overshadowed by APRA's founder, Victor Raul Haya de la Torre, who dominated the movement until his death a year ago. Villanueva's wife was born in Chile, the country that defeated Peru in a war that still rankles a century later.

Nonetheless, Villanueva and APRA are expected to receive at least 30 percent of the vote. Luis Bedoya Reyes, to the right of Belaunde and Villanueva, and various leftist candidates are thought to be out of the running.

Should Belaunde win, the question is if it would be by a large enough vote to avoid sending the presidential electin to Congress. The 60 senators and 180 deputies also elected today would pick the chief executive if no presidential candidate receives 36 percent.

The fear in some circles has been that the Congress could deadlock, and this might give the military an excuse to remain in power. In the past two weeks, polls indicated that Belaunde was on the threshold of receiving 36 percent.

Both the opinion polls and interviews with voters Lima indicated that Peruvians are tired of military governments. Corruption, economic mismanagement and inept administration have disilusioned many who supported the military when it seized power, promising revolutionary change in 1968.

As Morales Bermudez voted today, he acknowledged that the military had made "mistakes" but said his government had carried out "profound structural reforms that will serve to create a solid base for democracy."

Among the "structural changes" was land reform, especially the seizing of great sugar estates and making them into workers' cooperatives. The military also took over the newspapers -- a "reform" Belaunde has promised to undo if elected.

It is expected that a majority of the votes will be counted by early Monday.