President Ferdinand Marcos' candidates easily won most contests in the Philippines first local elections in nearly nine years yesterday, but opposition slates appeared victorious in a few scattered areas.

Anti-Marcos candidates won or were confortably ahead in three major cities on the southern island of Mindano and held the lead in a few other cities and provinces.

The first local elections since martial law was declared were marked by sporadic violence that included five reported slayings and widespread charges by both sides of election frauds.

Voting was suspended in several cities and there was accusations of stolen ballots, phony tally sheets, intimidation, and interference both for and against Marcos.

Filipinos had not voted locally since 1971, a year before Marcos declared martial law, and although he has replaced some city and provincial officials by appointment most have been in for nearly nine years.

Yesterday's election had been billed as a possible prelude to political normalization leading to an end of martial law and Marcos had personally approved many of the candidates representing his New Society Movement party.

But the two major opposition parties boycotted the election as a protest against martial law, leaving Marcos with only scattered oppostion by some independents and the old Nationalist Party he once headed.

The Liberal Party and Laban, a coalition opposition party, charged that Marcos tailored the election to suit himself by announcing it only 30 days in advance to give opponents little time to prepare.

The results will not change the Philippines political landscape very much. No significant national issues were involved in most places and most contests were fights between competing local factions. Some observers think the results strengthen Marcos' hand in the countryside, where most new officials will owe allegiance to the president who selected them as his party's candidats.

Marcos' unpopularity in Mindanao was underscored by three apparent defeats in the cities of Zamboanga, Davao, and Cagayan de Oro, where candidates of an antimartial law coalition, the Mindanao Alliance, were reportedly ahead. Official returns throughout the country were far from complete tonight.

In Zamboanga, a veteran Marcos foe, Cesar Climaco, trounced the Marcos candidate in what was the election's major test of sentiment on martial law. Climaco has refused to have his hair cut since martial law was imposed and vows to remain unshorn until Marcos is out of office.

In Davao City, a young newcomer was several thousand votes ahead and the Marcos candidate was running a poor third.

The president's candidates were sweeping almost all parts of metropolitan Manila and an opposing slate put up by the new National Union for Liberation was badly beaten in the Manila mayoralty race.

Imelda Marcos, the president's wife, was not required to seek election to the position she holds as governor of Metro Manila, the most powerful office in the city and suburbs.

The most bitter confrontation was in Batangas province outside Manila where a pro-Marcos incumbent governor was being challenged by a Nationalist slate put up by the Laurel family, long the political power there. The Laurels, once close friends of Marcos, broke with him last fall and challenged his candidates across the board.