What it came down to, at the end of the United Nations conference on women, was men. What would the men allow?

Would the Palestinian men permit the excising of the word "Zionism" and its equation with racism from the conference document? Would the Palestinian men persuade the Iranian men to go along? Would the Soviet men, who'd written the language in the first place, back down and give the Palestinian and the Iranian men, and all the other men who listen to the Soviet men, their blessing?

If not, would the American men and the Israeli men order their female delegations to walk out? Or could the Kenyan men keep the rest of the men talking and thereby save the day?

"There go the men who are deciding our conference!" cried a Chilean woman, and everyone turned to look toward the far wall of the plenary hall of the Kenyatta Conference Center. Marching single file, like a family of ducks, was the Soviet delegate Boris Mayorsky, followed by a Palestinian man and a Kuwaiti man and a Syrian.

"Go away!" Mayorsky warned as an Australian television cameraman began to film the meeting. "Go away or I will get the secretariat."

"I think we'd make a lot more progress," said U.S. delegate Esther Coopersmith, who was standing on the far side of the room, "if we could just get the men out of the room."

"I have my orders to walk out," Maureen Reagan was telling the head of the Philippine delegation in another part of the room.

In the end, the men gave in, the words equating Zionism with racism came out, nobody walked, and although there were a few more difficult paragraphs to go, by 2 a.m. Thursday the women of the world had their conference back."

And in a way, it was a sign of how far the women's cause had come since the U.N. declared the decade for women in 1975. Unlike the previous women's conferences, in 1975 and 1980, where many western nations refused to sign the final document because of the language on Zionism, no one was eager to take the blame for ruining the United Nations Women's Conference.

"In that way," said Cecilia Lopez, delegate from Colombia, "we have made real progress." At a 4 a.m. press conference, however, a teary-eyed Maureen Reagan dampened the euphoria by calling the machinations of the Soviets and their minions a demoralizing 'orgy of hypocrisy.' But worth fighting, she said, for the sake of the world's suffering women.

*

Maureen Reagan made points here. Europeans, Australians, just about everyone who read the advance publicity, expected an ogre or a shill, but were pleased to find she was neither.

"Having her as head of the delegation was helpful. She is a leader, and the job she's done has been that of a good ambassador," said the leader of the New Zealand delegation. "You could have had immensely worse leadership."

Reagan was praised by the Europeans for being flexible on resolutions calling for the eradication of family violence and comparable worth (which the Reagan administration opposes). She managed to disagree with her father without disowning him, and though she often parted ways with American feminists on method, she maintained her good name and her trademark California sunshine."

"Do I think that if men and women worked toward the same goals, and could realize their talents equally, that they would somehow converge and be equal persons in the workplace and in the home, is that what you're saying?" she said briskly to a male questioner from Commentary magazine. "Yes."

If Maureen Reagan was sunshine, the man who supplied the thunderclouds was Alan Lee Keyes, a 34-year-old U.S. representative to the U.N. Keyes is said to be Ronald Reagan's choice to become assistant secretary of state for international organization affairs, a promotion that would make him the state department's highest ranking black appointee.

Keyes was all over the Kenyatta Conference Center, slipping in and out of committee rooms, huddling with other male delegates, defending Reagan administration policies in South Africa, defending Israel and behaving, in general, like a man trained at the Jeane Kirkpatrick school of diplomacy.

Keyes took a high profile at the beginning of the conference, appearing at press conferences beside the president's daughter to field policy questions. By midconference, however, the delegation seemed to be taking pains to emphasize that Maureen was in control. By conference end, Keyes was turning away from television cameras and describing himself as "a worker bee."

Kirkpatrick never did swoop in from southern France to save the day, and the two congresswomen -- Lindy Boggs and Marjorie Holt -- didn't come either. But the group got good marks from many delegates for being reasonably open and very energetic.

Some of them said they disagreed with the Reagan administration's efforts to reverse the Supreme Court decision that made abortion legal, and some said the administration should be more open to the idea of comparable worth. They were professional women and feminists in their way, but they were disciplined and they never broke ranks. And they were game, working from 7 a.m. until midnight.

Holly Coors, wife of the millionaire beer maker, offered to type and run errands when she couldn't be useful any other way. The others served as go-betweens. The indefatigable Esther Coopersmith worked the conference center like an embassy row dinner, making friends and contacts ("You absolutely must meet my good friend . . . "). Mitzi Ayala, a pert blond rice farmer from California, had a business card distributed to and tucked away by unknown numbers of women from developing countries. "Agricultural Communicator" it read and included a lengthy list of tips on how best to handle a media interview ("Wear bright colors . . . ") Two Moroccan women, both dressed in richly patterned robes, and only one of whom spoke English, were not exactly sure what it all meant, but they seemed enchanted all the same.

*

Every party has a pooper and at the Nairobi conference it was the Iranian women, who swept about in funereal clusters of three and four, black eyes glittering from plain faces shrouded in midnight robes. They were the wild card, the mystery women, the stuff of feminist nightmares.

Their opening statement at the conference was delivered by a woman who shrieked and shook as she spoke. After that, all Iranian remarks began with praise of Allah, or the name of Islam or the glorious Islamic or the glorious Islamic revolution.

"They just don't care, they just don't give a damn," said a male Mexican diplomat who was standing by the Iranian delegation. "They've already returned to the Middle Ages."

They didn't appear to mind not being belles of the ball. In fact, they almost seemed to take a perverse delight in it. When they sat in public, every move they made was for the crowd. Aware that at any given time, half a dozen women were staring at them, they preened defiantly.

On Thursday, they introduced a resolution that called the White House a center for world terrorism.

Maureen Reagan, however, wasn't ready to give up on them entirely: "Even within the confines of those black shrouds," she told a press conference, "there beats the heart of a woman who wants a little more."

One of the Iranians had a chador patterned with tiny black dots. It was black dotted swiss, really, the only one like it at the conference.

*

If there was a spirit of the conference, a guardian angel, it was Betty Friedan. Long after the unofficial forum had ended and its 14,000 women participants had gone home, Friedan stayed on, hovered over the official conference, clucking over the U.S. official delegation. She chided them when she thought they went wrong, congratulated them when she thought it would spur them on to greater heights of feminist action.

She and Maureen Reagan called each other by their first names, and Friedan's questions at U.S. press conferences often sounded more like suggestions. "Don't you think . . . " she would say, and then deliver a bit of strategy in favor of another world conference in five years (the United States was opposed) or child care or comparable worth.

Because the Reagan administration is not likely to support most of the 300-plus proposals contained in the conference blueprint for the world's women -- on child care, on eradicating poverty, redressing trade imbalances that affect Third World women, and so on -- it will be private citizens like Friedan, as well as interested legislators, who will have to carry the ball in the United States.

That only encourages Friedan. It doesn't dampen her spirits. "This is a very good document," she said today, the last day of the conference. "It's leverage. It has possibilities."

For the Kenyan government it was a matter of pride that a decade that began in acrimony in Mexico ended with success in Africa. The Soviet Union had introduced disruptive language on Zionism, hoping to derail the conference, but they had underestimated the interest many developing countries had in seeing adoption of a document the Australian women called "our gift to the women of the world."

"If it is a victory for anyone, it is a victory for women," said Kenneth Matiba, the Kenyan minister in charge of striking the critical compromise on Zionism. "There was much more understanding of what this conference was about, what it meant. at Mexico and Copenhagen, everyone, even the press, thought the whole thing was a joke. But because there have been some results from the decade, there has been much more seriousness here, particularly from the developing countries. We thought, why should the graveyard of what started in Mexico be in a developing country when so much good could come of a success?"