The first Muslim chaplain in the U.S. armed forces was sworn in yesterday at the Pentagon, a response to the expanding number of Muslims enlisting in the military or converting to the religion in the ranks since the Persian Gulf war.

Imam Abdul-Rasheed Muhammad, born a Baptist 40 years ago in Buffalo, stood at attention yesterday as his wife pinned on his uniform the double bars signifying the rank of Army captain and a crescent-shaped chaplain's crest designed for yesterday's ceremony.

His swearing-in capped 10 years of negotiations between military leaders and representatives of the American Islamic community, a process that both sides said generated increased respect for the other's religious beliefs.

Many enlisted Muslims attending yesterday's ceremony shared stories of discrimination, harassment and misunderstanding that have arisen when their religious beliefs clashed with military regulations. They said they see the appointment of a military chaplain who is an Imam -- a Muslim religious leader -- as a crucial first step in smoothing out those conflicts and accommodating Muslims in the military.

"This is very historic," said Col. Herman Keizer Jr., 55, an Army chaplain and the executive director of the Armed Forces Chaplain Board. There are 243 religious denominations with 3,152 chaplains in the military, but "this is the first non-Judeo-Christian faith group to have representation."

American Buddhists are searching for a candidate to serve as their first chaplain, Keizer said.

Gauging the numbers of Muslims in the ranks is difficult because enlistees are not required to list their religious preference, said Lt. Col. Doug Hart, a spokesman for the Defense Department. He said the military has on record 2,500 Muslim members in all branches, of a total 1.7 million troops and an estimated 5 million Muslims in the United States. But the Muslim Military Members, an organization formed in 1990 at Fort Bragg, estimated that there are more than 10,000, said the group's executive director, Qaseem Ali Uqdah, 36, also known as Marine Gunnery Sgt. Archie Barnes.

Some Muslim recruits reported that their recruiting officers told them to simply mark "Catholic" on their applications to avoid scrutiny or discrimination, said Imam Ghayth-Nur Kashif, chairman of the Council of Imams of Washington, who helped negotiate for the chaplainship.

During the war in the Persian Gulf, news reports said that as many as 5,000 Americans stationed in Saudi Arabia had converted to Islam. Many American troops attended tent-side programs on Islam sponsored by the Saudi government, Keizer said.

The recent movie "Malcolm X," director Spike Lee's life story of the slain black political leader, also contributed to the growth of Islam in the United States both in and out of the Armed Forces, said many Muslims at yesterday's ceremony.

Whatever the numbers, the new Muslim chaplain faces difficult challenges. Muslim life is structured around five daily periods of prayer to Allah, the Arabic name for God. Daily prayers may be said individually. But commanding officers are sometimes reluctant to grant permission for their observant troops to attend the required congregational prayers at midday each Friday, Muhammad said.

In addition, some officers refuse permission for enlisted Muslim women to wear the traditional cloth head-covering called a hijaab, said Saabirah Khalil-Ullah, 25, an administrative specialist in the Army who serves as director of sisters' affairs for the Muslim Military Members.

Food also can be a problem. Military MREs -- Meals Ready to Eat -- often contain pork, which Muslims are prohibited from eating, Uqdah said. New kosher MREs, which do not contain pork, are being produced but are not yet widely available, he said.

"When I first joined the military, it was a rabbi who ensured that as a Muslim I was given a right to pray and I didn't have to eat pork when the drill instructors were going to force me," Uqdah said.

But as more and more officers have contact with Islam, life for Muslims in the Armed Forces has improved, Uqdah said. Last year, he was among 75 enlisted Muslims who made their hajj, a pilgrimage to Mecca, aboard a military aircraft.

There were two hurdles to appointing an Islamic chaplain. The military had to approve a Muslim organization to vouch for the chaplain's credentials, a tricky proposition because in Islam there is no centralized, hierarchical religious structure. The American Muslim Council, based in Washington, was chosen as accrediting agent.

Next, Muhammad was selected after letters seeking candidates were sent to mosques across the country. He had served in the Army from 1982 to 1985 as a behavioral science specialist at Fort Lee in Virginia, where he sometimes conducted Friday prayer services. He has master's degrees in counseling and social work and is now a prison chaplain at two medium-security prisons near Buffalo.

After he completes training at the Army's Chaplains School at Fort Monmouth, N.J., Muhammad will be stationed at Fort Bragg, N.C. His wife and six children, ranging in age from 14 to 2, will join him.

"We can't wait," said Abdul Rashid Abdullah, 21, a parachute rigger who serves as a Muslim lay leader at Fort Bragg. Abdullah was raised a Roman Catholic named Ronald Leuschen and converted to Islam in college.

"The chaplains who are there don't know enough about Islam to service the soldiers," he said. "And sometimes the soldiers are new to Islam; they are gung-ho, and they need guidance."