In less than two months since taking power through an election few analysts thought it could win, Spain's Socialist Workers' Party has begun implementing a domestic agenda to remake this historically conservative society to resemble the more open, secular models of northern Europe.

On the day he was confirmed as prime minister in April, socialist leader Jose Luis Rodriguez Zapatero told parliament he planned to change the civil code to allow gays and lesbians to marry, and to end all legal discrimination against homosexuals. This was followed days later with appointment of a new-look cabinet of eight men and eight women, including a female deputy premier -- gender parity that puts traditionally macho Spain on a par with Sweden.

The Socialists' first bill in parliament proposed increasing the penalties for domestic violence, which Zapatero called an "unacceptable evil" accounting for the death of one woman every week in Spain. The rules of royal succession would be changed, he said, to allow women to take the throne. Sex-change surgery would be paid for by the national health plan.

The socialists governed Spain for 13 years before losing to the Popular Party in 1996. Back in control, they are resuming an agenda of bringing Spain more in line with much of the rest of Western Europe after its long isolation during the rule of Gen. Francisco Franco. With money in short supply, however, they are holding back on traditional socialist goals of more generous social programs.

So far, their efforts have been supported by more than a majority of the Spanish public. Sociologist Alberto Moncado said the government's initiatives were particularly popular among young people, indicating the Roman Catholic Church's waning influence. "In Spain, like everywhere, young people are less church-going," he said.

The government has also announced plans to change Spain's restrictive abortion laws, to make all abortions legal during the first 12 weeks of pregnancy. Currently, abortion is allowed only in cases of a deformed fetus, rape or if the physical or mental health of the mother is endangered. There are also plans to roll back the previous government's law making religious education -- in Spain that means Catholic education -- compulsory in public schools.

Dramatic changes have also come in Spain's international relations. Fulfilling a campaign pledge, Zapatero withdrew Spain's small military contingent from Iraq, reversing the position of the former prime minister, Jose Maria Aznar, who was one of President Bush's most steadfast European allies in the Iraq war. But Zapatero has stuck with the broader defense relationship with the United States, which maintains about 4,000 troops in Spain.

Zapatero quickly mended fences with France and Germany, promising that Spain would no longer block moves toward a European Union constitution and a new voting system for the union.

Government officials defend these moves as a response to voters' demands for change expressed in the March 14 election. Those demands were fueled by an attack three days earlier, when a series of bombs on morning commuter trains killed 190 people and an unborn fetus and wounded 1,400. The attack, initially ascribed by Aznar's government to the Basque separatist group ETA, was later linked to Islamic radicals angry about Spain's military presence in Iraq. The death toll was originally given as 191, but the new government reduced it by one after it decided the fetus was not a person.

Most opinion polls before the election had shown Aznar's party winning comfortably. But voters appeared to fault the government for mishandling initial information about the attacks and for seeming too eager to blame ETA.

Members of the Popular Party continue to call their defeat a fluke, an emotional reaction to the attack. Socialist leaders angrily reject that charge.

"All of the studies we made during the campaign determined that the citizens wanted change," said Javier Rojo, president of the Senate and a senior figure in the Socialist Workers' Party, in an interview in his expansive office. "We should respect the way the people voted. There are no votes that are somehow more legitimate than others."

In pushing for fast social changes, Rojo said, "We're trying to make Spain what Spain is. If somebody doesn't want to see this society for what it is, then he's out of touch with the world. In Spain, 50 percent of the population is women, and that has to be mirrored in the government. In Spain, people may want to live one way or the other, but they're all taxpayers. They're all equal."

The Catholic Church has met the planned changes with hostility and has pledged to fight them. Manuel Monteiro de Castro, the papal representative, told a Spanish bishops' conference in early May that "the new political situation has brought new challenges to the church, to which it will have to find an adequate response," according to a report by the Catholic News Service.

Said Rojo: "Because of our history, the Catholic Church is important, but the Catholic Church cannot decide over the will of the Spanish people."

The government seems to have widespread backing for its reforms. A June 7 poll in the Madrid newspaper El Mundo showed 80.3 percent of respondents supported withdrawal of the Spanish troops from Iraq. Some 55.3 percent backed the decision to remove compulsory religious education from schools, and 60 percent rated Zapatero's performance as good or very good.

A separate Gallup poll showed more than half of Spaniards support gay marriage, and 54.1 percent think gays should be allowed to adopt children.

Under the 1939-1975 rule of Franco, homosexuality was illegal and homosexuals were sometimes placed in mental institutions. Democratic governments have since repealed the ban, and gay lifestyles are widely tolerated, But Aznar's government ruled out gay marriage. Many gay people feel the change is long overdue.

"There was discrimination before, because I was living with someone for years and could never take advantage of marriage," said a 54-year-old man who gave his name as Ramon, seated at the bar in the Black & White, a gay hangout in Madrid.

Yet some of Zapatero's critics say the concentration on social issues is a relatively easy way for the government to engender popularity, because most of the practices were tolerated anyway. For example, while abortion laws are restrictive, many women have gotten around them by signing a statement saying they would suffer psychological distress if they gave birth. About 80,000 abortions are performed in Spain each year.

The critics say the rapid movement on social reforms belies the government's far slower pace in making good on many of its more difficult campaign pledges, such as resolving conflict between the central government in Madrid and the Basque region and other regions demanding greater self-rule.

Following his election victory in March, one of Zapatero's first telephone calls was to the president of the Basque regional government, Juan Jose Ibarretxe. Aznar had not spoken to Ibarretxe since 2001 and had threatened to jail him for pushing a new autonomy plan. So Zapatero's phone call and the promise of an early meeting were heralded as the beginning of a new era of dialogue.

Basque leaders and others now say they are disappointed. "We are still waiting for the meeting between Ibarretxe and Zapatero to take place," said Miren Azkarate, a minister and spokeswoman for the Basque government in Vitoria. "For the time being, the new government in Madrid did not follow up on its good intentions with real facts." Among other things, she said, Zapatero has not dropped a lawsuit that the Aznar government filed against the Basque government, and members of the banned Batasuna party are still prevented from running for office under a new party.

"I feel very critical," said Edurne Uriarte, a Basque political scientist interviewed by telephone from Bilbao. "In relation to the Basque country, I think we are in a period of waiting."

Uriarte was critical on the gender-parity issue as well. Although half of the 16 cabinet members are women, she said, the second-tier level -- the deputies and agency heads -- are still mostly male.

Also, the key portfolios -- defense, foreign affairs and finance -- are still held by men. She also said the new domestic violence legislation is similar to what the Aznar government proposed.

"In terms of public image, this has been important," Uriarte said. Zapatero "has been successful in showing a new style of someone close to the people."

Zapatero has had to backtrack on other announced changes. For example, a plan to allow Spain's provinces to field sports teams under their own flags in international competition was quickly shelved after an uproar from Spanish national teams.

Other costly campaign promises have been indefinitely delayed, while the new finance minister, Pedro Solbes, stresses fiscal discipline. A pledge to provide direct government subsidies to renters has been shelved for now. A plan to replace the 15 percent capital gains tax with a sliding tax has been delayed. And a promise to increase the minimum wage has been put on hold because of the potential cost.

Rojo, the Senate president, conceded that the government has been slow to move in some areas, reflecting the reality that running the show is much harder than being in the opposition. Increasing the minimum wage, he said, "is not impossible" but not until the next budget. Resolving the housing problem, he said, "is very complicated. It's not something we can fix in the short term."

On the Basque situation, he credits the new government for creating "a different climate to do things differently."

"Governing is complex," he said. "Some of the promises we've started to implement. Others will come."

Special correspondents Pamela Rolfe and Robert Scarcia contributed to this report.