Women mourners in full-length black robes sob and wail as pallbearers carry two coffins around a mosque three times in the traditional final visit to the shrine for the dead person before burial. Photographs of the deceased, taped to the ends of the coffins, show faces of young men in their twenties in olive uniforms.

"Everybody has lost a son, or a brother, or a father," says an Iraqi government official who insists on remaining anonymous. "Personally, I don't think the war was needed."

More than two years after launching a full-scale invasion of Iran at the start of the Persian Gulf war, Iraq is weary of battle and anxious for peace. It continues to fight because it fears a counterinvasion by Iran, but its economy is deteriorating and malaise is taking hold.

The Iranians, whose Army turned the tables on Iraq in the spring, have shown little interest in a negotiated settlement. They seem to hope that a war of attrition will weaken Iraqi President Saddam Hussein, whom they have vowed to topple.

The president's war strategy has backfired, and there are signs that his support has begun to erode. Generally, however, he is described as maintaining his tight grip on the country through the secret police and the ruling Baath Party.

"The regime can last at least another year like this," a knowledgeable European diplomat here said. Iraq's fate in the war is crucial to Saudi Arabia and the other states that line the western coast of the Persian Gulf. A decisive Iraqi defeat would leave these oil states exposed to attack by Iran, which regularly calls for the overthrow of their pro-Western governments.

From a technical military point of view, Iraq's superiority in stocks of weapons and its natural advantage as the defender should mean that it can succeed in containing any Iranian thrusts across the border. Morale among both troops and civilians seems resigned, however, and further decline could lead eventually to a crumbling of the society.

Heavy casualties are the principal cause of disillusionment about the war. Iraqis usually are scared to speak critically of the government to foreigners, but once they feel comfortable they often will complain bitterly about family or friends who have been killed or wounded.

The government currently does not make public the total number of Iraqi casualties in the war, saying that such information would help Iran. Foreign diplomats estimate the number of dead at between 30,000 and 60,000 out of a population of 14 million. In other words, Iraq, with less than one-fifteenth the population of the United States, may have lost as many dead as the United States lost in Vietnam.

Thousands of families do not know the fate of their kin because a large number of Iraqis are reported to be missing in action. A soldier is confirmed to have been killed only if his body is recovered, and he is listed as a prisoner of the Iranians only if a comrade swears on the Koran he witnessed the capture.

The number of Iraqis wounded is estimated at between 70,000 and 100,000, which is lower than the normal ratio of three soldiers wounded to one killed. One possible explanation is the intense heat -- above 100 degrees -- during the major battle outside Basra in southern Iraq in July. In many cases, the wounded died in the heat before medical care arrived.

About 50,000 Iraqis have been captured, according to Red Cross reports. The large number of prisoners is believed to reflect a willingness to surrender.

Although soldiers are being killed less than 100 miles away, this capital does not appear to be a city at war. Antiaircraft guns are seen on the eastern edge of town, but there has not been an air raid since August.

Residents report nevertheless that the atmosphere has worsened as the war has dragged on. Soldiers home on leave occasionally drink too much and get in brawls. The number of robberies has increased, although it still is well below the level considered normal for a U.S. city.

The future of the economy also is becoming a worry. Saddam Hussein, after pressing forward with his ambitious development plans for two years despite the war, recently announced that the nation would have to economize in 1983.

The government still is preparing its budget and has not detailed where the austerity measures will bite. Imports of luxury items by the small private sector are expected to be cut, which could reduce available supplies of imported food and electronic appliances. Completion of a major sewage network in northern Baghdad and other development projects may be postponed.

Considering that Iraq is spending about $1 billion a month on the war, its ability to avoid a major retrenchment earlier is remarkable. The country's oil revenues have plunged from $40 billion a year at the start of the war to $9 billion at present because its two principal export routes have been blocked. Iranian war planes destroyed oil loading facilities in the Persian Gulf, and Tehran's ally Syria shut down two pipelines that ran from Iraq through Syria to the Mediterranean.

The key factor supporting the economy is aid from Saudi Arabia, Kuwait and other Persian Gulf Arab states that fear Iranian ambitions. Despite the help, Iraq's hard-currency reserves have fallen from more than $30 billion at the start of the war to less than $10 billion today. The country's large state-owned sector already is several months behind in some payments to foreign companies, and U.S. exports to Iraq in the first half of this year fell from $458 million to $365 million.

Consumers face an inflation rate of about 40 percent and occasional shortages of potatoes, tomatoes and eggs. Government subsidies have limited the size of price increases for food staples and other necessities, however, and stores have plenty of clothing and household goods.

"The government will make sure that the man in the street is the last to suffer," said one professional economic analyst here. "The main victims so far are foreign companies that aren't getting as much business as before."

The principal prop to Iraqi morale at present is the threat of invasion by Iran. The Iraqis so far have shown no sign of rising in an Islamic revolution of their own and overthrowing the secular Baath Party, which permits the sale of alcohol and Western dress for women.

Most Iraqis seem to blame Iran's religious leader Ayatollah Ruhollah Khomeini for the war. They defend the official Baghdad line that Iraq was forced to fight because of Iran's shelling of Iraqi border towns and efforts to promote a revolution here, although they frequently add that Saddam Hussein has made many mistakes.

"The people would grumble a lot more about the war and Saddam if Iran weren't saying in its propaganda that it wants to capture Baghdad," one Iraqi said.

Iranian officials have spelled out their terms for a cease-fire in piecemeal fashion, but they repeatedly have mentioned three demands that are particularly difficult for Iraq to accept: the removal of Saddam Hussein, payment of $150 billion in war reparations to Iran and repatriation to Iraq of tens of thousands of Iraqis of Iranian origin expelled two years ago and now living in Iran.

Less than a month ago Iraq accepted peace proposals made by a negotiating team formed by the Islamic Conference Organization. They called for mediation of border disputes and of the reparations issue. Iran had rejected the most recent terms, however, before they even were delivered to Baghdad.

To some extent, Khomeini appears to want to punish Saddam Hussein personally for launching the invasion in 1980 and for expelling Khomeini from Iraq four years ago after Khomeini had spent 14 years in the country in exile. Iran also calls for the replacement of the entire Baath government with an Islamic one, but this is described as a "recommendation" to Iraq rather than a demand for peace.

Criticism of Saddam Hussein's policies seems to have grown since the battlefield reverses in the spring, according to analysts here. He says he is determined to hang on to power, however, and often is described as a survivor.

In the first major purge of the leadership since 1979, three influential government ministers were dismissed from their posts in June. The three were linked to former president Ahmad Hasan Bakr, who was understood to have had doubts about the war.

A fourth official, Health Minister Riyadh Ibrahim Hussein, was executed for allegedly having allowed distribution of toxic medicines. According to one report, he was killed after having criticized the president's policies openly at a party meeting.

In another sign that the government feels weak, the government in the past 10 days has organized a string of large public demonstrations in support of the president.

Saddam Hussein admits that he is not universally popular, although he says his critics are agents of Iran or other foreign countries.

"I do not say that all the people love me," he told U.S. correspondents at a press conference last week. "Certain of those who carry the Iraqi identity card want to cut me to pieces, [but] it is just a small part statistically."

The most likely hotbed of opposition is among the nation's Shiite Moslems. They make up at least 55 percent of the population, while a majority of the leadership is made up of members of the Sunni branch of Islam. There have not been any signs of significant unrest among the Shiites since the war began, however.

The president's principal source of power is the Mukhabarat or secret police, which is led by his half-brother, Barzan Tikriti. The police have an extensive network of informers, and private citizens who have spoken critically of the government have been arrested at night and disappeared, according to responsible sources living here.

Also encouraging loyalty to Saddam Hussein is an unrelenting personality cult focused on the president. The face of Saddam Hussein--often wearing an Arab headdress or smoking a cigar--peers out of photographs hung in practically every office, shop or bazaar stall.

Even if Saddam Hussein were replaced in an internal Baath shuffle, the party almost certainly would live on. It is considered to have perhaps the most efficient and well organized administrators in the Arab world, and Saddam Hussein says that its influence reaches "in every corner, in every eyebrow."

The party exercises its control in part through patronage; local officials help individuals to obtain promotions in their jobs or permission to buy automobiles. In addition, the president and party have spent Iraq's oil revenues to build hospitals, schools, roads and generally to raise the standard of living.

The Army in particular is considered to be loyal to the Baathists. As a precaution against ambitious generals, however, the state-run media have not given acclaim to any single military commander.