MADRID, JUNE 10 -- Spain's governing Socialist Workers' Party lost some ground today in a three-tier election that was nevertheless seen as a key indicator of Prime Minister Felipe Gonzalez's continuing popularity.

With 47 percent of the ballots counted, the Socialists remained by far the most powerful party in Spain, despite strikes and demonstrations earlier this year. The election was for Spain's delegation to the European Parliament, for legislatures in 13 of the country's 17 regional parliaments and for municipal posts. It marked the first time Spain has elected members to the European Parliament, following its admission into the European Community last year. The first delegation was picked from the Spanish parliament.

According to the partial results, the Socialists had won 40 percent of the votes, or 27 seats, in the election for Spain's 60-member European Parliament delegation; that represented a loss of eight seats. The party received 44 percent of the votes in last June's general elections.

The conservative Popular Alliance Party was running a distant second with 24 percent, or 17 seats, a gain of three seats.

Gonzalo Robles, campaign manager of the Popular Alliance, said there had been irregularities in a number of precincts where voters discovered their names had been omitted from registration lists and that the party was considering challenging the results.

Officials said that 68 percent of Spain's nearly 28.5 million voters had participated, similar to the turnout in national polling a year ago when Gonzalez won a second term.

Since the June 1986 national elections, the 45-year-old premier had faced growing public criticism focusing on government economic austerity measures.

Opposition to those measures appeared to strengthen support for the United Left, a coalition led by the Communist Party, which was forecast to win about 10 percent of the vote in Madrid's municipal elections and to win three seats in the European Parliament.

The Socialists were set back in municipal elections, notably in major cities such as Madrid, Saragossa, Valencia and Gonzalez's home town of Seville. The party did strengthened its hold on Spain's second largest city, Barcelona.

The fractured nature of the opposition to Gonzalez's Socialists underscored his political strength. The campaign tended to pit the liberal Social Democratic Center, led by charismatic former prime minister Adolfo Suarez, against the Popular Alliance in the battle to lead the opposition against the Socialists.