Center-left presidential candidate Alan Garcia surged to a commanding lead tonight in national elections that appear to have shifted power in this embattled country away from the center-right.

Garcia, the 35-year-old leader of the APRA party, received more than 45 percent of the vote in the field of nine candidates in partial results reported unofficially by Peruvian television. His share of the votes counted was more than double that of Marxist Alfonso Barrantes of the United Left coalition, who was running second.

The preliminary count of about 10 percent of the national vote, including nearly 30 percent of the vote in the capital, indicated that Garcia would be forced into a runoff with Barrantes to determine the successor of retiring President Fernando Belaunde Terry, whose term expires July 28. However, Garcia's APRA party appeared within reach of majorities in the elections for a Congress of 60 senators and 180 deputies.

Belaunde's center-right Popular Action Party was headed for a crushing defeat in the vote, finishing fourth with only 5 percent of the vote in initial results. Another conservative grouping, the Democratic Convergence, appeared headed for third place.

The election came amid rising social unrest, severe economic crisis and political violence that have ranked Peru among Latin America's most troubled countries. More than 5,000 persons are reported to have died since 1980 in warfare between the guerrillas and security forces. Belaunde's government has been accused of allowing serious human rights violations in the Andean war zone.

Economically stagnant for more than a decade, Peru ranks near the bottom of South American nations in per capita income and also has one of the continent's most serious foreign debt problems. It currently has no agreement with banks for refinancing of its loans and has fallen nearly $300 million behind in interest payments.

Blackouts, apparently due to sabotage, were reported tonight in the northern coastal city of Ica and the highland departmental capitals of Ayacucho and Cuzco. They followed a series of bombings and other attacks in Lima and interior cities last night by leftist insurgents seeking to disrupt the election.

However, balloting was reported peaceful in Lima and other parts of the country, including the Andean departments, where the Maoist Shining Path guerrilla group is based. It began its armed attacks five years ago, on Peru's last presidential election day, and had called for a boycott of this election.

More than 100,000 military and police forces were reported deployed beginning yesterday to guarantee security during the voting. Long lines formed around the capital as voters marked ballots.

While the independent Peruvian media began reporting the unofficial results this evening, completion of the official vote count was expected to take up to several weeks. If the second round of the presidential election is needed, it is expected to be in June.

Garcia, who was visited tonight by Barrantes, told reporters that he was "satisfied" by the vote but did not claim victory. "This has not been a vote of protest against Belaunde's government but a vote of hope," he said.

Other APRA leaders jubilantly describe the preliminary results as a clear victory and maintained that a second round, if held, would amount to a formality. "We may not have a winner tonight," said Alfredo Barnechea, an APRA leader, "but there is no doubt that Alan Garcia will be taking over the presidential sash."

Originally a populist, nationalist movement whose conflicts with the armed forces led to proscription, several violent rebellions and years of clandestine activity, APRA has modernized under Garcia's leadership and now is often compared to social democratic parties in Venezuela and Europe. The name, an acronym for American Popular Revolutionary Alliance, reflects its founders' ambitions of creating a pan-American movement.

Garcia avoided specific policy definitions during the campaign and concentrated instead on a theme of uniting Peru's 18 million people. However, APRA's platform proposes major changes of policy to confront the country's economic troubles, including a shift of resources from overpopulated cities and inefficient industry to agriculture in the countryside.

Garcia has indicated that he may attempt to revise the terms of Peru's $13 billion foreign debt. Statements describe party economic policies as "incompatible" with the "recessive practices normally prescribed by the International Monetary Fund," and some party leaders say Peru may seek to defy the norm that an economic program be negotiated with the IMF prior to refinancing.

To the left of Garcia, Barrantes, 56, offered a radical program that included a suspension of foreign debt payments and nationalization of foreign mining and petroleum interests. Elected mayor of Lima in 1983, Barrantes defines himself as an independent Marxist and leads a coalition including democratic socialists and pro-Peking and pro-Moscow Communists. It appeared to consolidate a position as the largest Marxist political movement now active in a Latin American democracy.