LIMA, Peru (AP) _ President Alan Garcia's Aprista party headed for strong gains in Peru's nationwide municipal elections Sunday and unofficial reports said it was winning its most important target - the Lima mayor's office.

Voters cast ballots for 1,932 mayors and more than 18,000 municipal council members in the elections that Maoist guerrillas vowed to disrupt.

No major attacks wqere reported, but there were two dynamite blasts in the Andean city of Ayacucho that caused damage but no injuries, police reported.

Television station Channel 5 reported that Jorge del Castillo, the Lima mayoral candidate from the center-left Aprista party, ran strong.

It said an estimated 3.1 million ballots were cast in Lima, the capital, and with 97 percent counted, Castillo had 34.9 percent.

The report said the Marxist incumbent, Alfonso Barrantes, was second with 32 percent and Luis Bedoya of the conservative Popular Christian Party had 25.7 percent. Minor candidates shared the rest.

Channel 5 said the results in the capital, which has a population of six million, were calucated by Peruana de Opinion Publica, one of the country's major polling organizations.

The report said partial results from the provincial elections showed Aprista candiates leading in most races.

Official government reports on the results for Lima are expected within 10 days but it could be three weeks before the victors are officially announced in the provincial contests.

The Apristas have never won the Lima mayor's post since the party was founded in 1924.

Winners of the mayoral races are scheduled to take office next Jan. 1.

The elections were the first nationwide test of Garcia's 15-month-old government.

Polling hours were from 8 a.m. to 3 p.m., but they were extended until 4 p.m. because of lines at some districts.

The Maoist Shining Path guerrilla movement had warned Peru's estimated 8.5 million eligible voters not to participate.

Before dawn in Ayacucho, an explosion split the door of a home belonging to a United Left candidate for deputy mayor but hurt no one. Another charge exploded outside an office containing pay telephones, causing minor damage.

Police said it appeared the Shining Path, which began its insurgency in Ayacucho six years ago, was responsible.

On election eve, six hooded Shining Path guerrillas stormed into a radio station in the central Andean city of Huancayo and shot to death a city council candidate from Garcia's Aprista Party, police reported.

Also on Saturday, an independent city council candidate in Lima was injured when a bomb thrown at his home exploded.

Aprista candidates were favored to win most of the municipal posts outside Lima as a result of Garcia's success in boosting economic growth after inheriting a shattered economy.

Peru's economy in 1986 has grown at an annual rate of 6.9 percent, the highest since 1974. In addition, Garcia has lowered the inflation rate from more than 250 percent during the last six months of the previous government to under 70 percent this year.

But the Apristas faced a tough fight in the Lima area, where nearly one- third of Peru's people live, most of them in bleak shantytowns on the fringes of the city.

Garcia campaigned hard for the 36-year-old Castillo, a former provincial governor.

The conservative Bedoya, 69, served as mayor for two three-year terms in the 1960s. Barrantes was the first Marxist mayor of Lima and had the most to lose.

He heads the United Left, a shaky coalition of leftist parties that represent Garcia's major opposition. Barrantes is viewed as a moderate within the coalition, which includes parties that have been accused of having ties to the Shining Path.

About 40,000 soldiers and 20,000 policemen were on duty throughout the country to protect voters and polling stations.

In Lima, troops moved voting urns into place during a 1 to 5 a.m. curfew.

Despite the guerrillas' warnings, peasants arrived early in Ayacucho and formed long lines in bright sunshine to cast ballots.

To protect Ayacucho's residents from reprisals, voters there were not required to dip their fingers in indelible ink, a step normally required to prevent repeat voting.

Lima has been under military control since February because of a wave of guerrilla attacks.

Garcia pledged to seek a dialogue with rebels when he took office, but the Shining Path responded to the peace overture by stepping up bombings and assassinations of police and military officers in the capital.

The only major political group not taking part in the elections was the center-right Popular Action Party of Garcia's predecessor, Fernando Belaunde Terry. The party won only 6 percent of the vote in last year's presidential elections. It is sitting out this year's municipal races to reorganize for the 1990 presidential contest.