Aida an illiterate teenage housemaid, has taken a month off from her job to get married. The wedding was a typically Egyptian affair, celebrated on the corner of the crowded alley where her mother lives. Attended by the whole neighborhood, it was noisy, confusing and joyous. All the participants hoped it would be Allah's will to bless the marriage with a child within a year.

During Aida's absence her work is being done by her friend Suheir, 16 and also illiterate. She too will be getting married soon, and expects to have her child right away.

The result: two more skrimishes lost in Egypt's long war against its population explosion.

It is a war that Egypt is not winning. It may be losing at a slower rate than in the past, however, and under international pressure, backed by international cash, the government is attacking the problem on some new fronts. American and other advisers to the government, as well as many Egyptian officials agree that no task here is more urgent.

There is evidence according to family planning experts, that while most rural Egyptians retain traditions and customs that favor large families, a growing number accept the idea that it is beneficial to limit the number of children. The problem, officials say, is that the government is not providing adequate birth-control services to those who want them.

"You have a potential population that seeks these services and once you make them availabe they will use them," said Dr. Aziz Bindary, chairman of the Population and Family Planning Board. He said it is "100 percent true" that the government has failed to deliver, however.

He blamed the "catastrophic situation" in the Egyptian bureaucracy. "It's the country's fourth great pyramid," he said. "It guarantees societal inertia."

All authorities agree that it is an inertia Egypt cannot afford.

At a recent news conference, Gamal Askar, the government's director of statistics, announced that the population has reached 40 million and is growing at the rate of one person every 31 seconds. It is expected to rise to 65 million by the year 2,000 and, at the present growth rate, would double in 28 years.

That would be more than enough to wipe out economic gains in a country that is 96 percent uninahitable desert. Already the population density in Egypt's inhabited areas is one of the highest in the world and Egypt is a major importer of basic foodstuffs.

Impatient with the government's halfhearted family planning effort, the international leaders who keep the Eguptian economy afloat are putting on pressure for an expanded campaign.

The U.S. Agency for International Development is drafting specific recommendations to government agencies suggesting how they can improve their performance and even calling for changes in some Egyptian laws to faciliate birth control programs.

AID has been supplying condoms, in bright colors aimed at making them more attractive to potential users, but officials admit that many of these have found their way into the black-market for sale in countries where they are not legal.

Now AID is stepping up its participation embarking on an $17 million program that focuses on one administrative region and includes the training of field personnel. The World Bank has agreed to finance a $30 million program in five other regions.

Their task is a formidable one. Experts here say that population growth trends tend to vary for economic and social reasons, not according to government policy. It appears that not enough people have been persuaded that they would gain from holding down the number of children.

The birth rate which was a stagering 43 per thousand in the 1960s, nearly three times that the United States, dropped to 34.6 per thousand by 1972. But experts say that was because of the social disruption caused by the disastrous 1967 war. This has been offset by a "baby boom" since the 1973 war that has brought the rate back up about 39 per thousand.

The 1976 census showed the population growing by 2.3 percent a year, and a recent survey indicates it is actually closer to 2.64 percent. That is despite the facts that annually more than a hundred thousands babies die in their first year and that hundreds of thousands of young Egyptians are deferring marriage because of the country's housing shortage.

Experts cite a variety of reasons for the continuing surge of population in the face of economic desperation.

Most Egyptian women are illiterate and females make up less than 10 percent of the work force. This tends to limit women's access to and their desire for birth control information.

The government's population centers distribute five different brands of the pill, not compatible with each other substituting, one for another when the supply runs out and disrupting the patterns of those who take them.

Egyptian law prohibits the insertion of intrauterine devices by anyone other than physicians which means village midwives cannot be trained to do it. Much of the Islamic leadership is against any of form of family planning.

In addition according to Dr. Bindari, "The whole pattern of the village is based on supporting traditional virtues. That includes fertility. The male's personal pride and ambition can only be expressed by having children. Children are labor, they are old-age insurance." He said that is why sterilization, although legal, is rare.

The Egyptian leadership is aware of the urgency of the problem. Newspapers talk of the population growth as "Malhtusian." President Anwar Sadat's wife, Jehan, seizes every opportunity to promote family planning as the country's most pressing priority, but little has happened in practice, or at least not enough.

To change that, Dr. Bindari said, the new programs aim to provide economic incentives at the village level to persuade the people that it is in their own interest to have fewer children. The proof that they can be persuaded, he said, lies in the rising abortion rate. He estimated that 9 percent of all Egyptian pregnancies end in abortion which, although illegal, is tolerated.