After the first formal talks on forging a new government, the Social Democrats and the environmentalist Greens emphasized their desire Friday for a stable coalition.

Even when differences came up during the five hours of talks, the mood was one of consensus-building, leaders on both sides said.Chancellor-elect Gerhard Schroeder, a Social Democrat who ousted Chancellor Helmut Kohl in Sunday's election, has said he wants to form a coalition quickly and is expected to be sworn in on Oct. 27. The Greens are eager to secure a place in the national government for the first time.

"The atmosphere was good," said Wolfgang Thierse, a member of the Social Democrat team. "The differences are known, and we'll have to work them out in the next few days. But in every area, it was evident that the will to agree was enormous."

The two parties agreed on the urgent need to combat unemployment, now above 10 percent, and announced they would launch a drive to fight joblessness, especially among young people trying to enter the work force.

They also discussed energy taxes and nuclear power, points on which the Greens take a hard line. The Greens would like a steep increase in energy taxes and immediate steps to scrap nuclear power.

Schroeder has made clear that it is up to the Greens to adapt their sometimes radical stands if they want to be a junior governing partner. The Greens, who maintain a shaky balance between moderates and leftists, are likely to be strained in the weeks ahead by the need to suppress their more radical elements.

For the Social Democrats, accommodating the Greens is tricky even beyond the policy differences because they seek to share posts equally between men and women.

The Greens are likely to get only three Cabinet posts, two of which seem set to go to men - moderate Joschka Fischer as possible foreign minister and leftist Juergen Trittin pegged for the environment post - leaving space for only one Greens woman in the Cabinet.

At Friday's talks, men dominated Schroeder's 13-member delegation, while the Greens pointedly sent six men and six women.

Although the Greens are determined to get into a coalition government, they are not known for party discipline, and members were making pet demands.