Salahuddin Mustafa Muhammad, the imam at the Masjid al-Ikhlas, a mosque in Newburgh, N.Y., has spent more than two decades ministering to the Muslim faithful in prisons, serving as a chaplain at the nearby Fishkill Correctional Facility. There, he leads prayers and offers counseling.

“Most people are searching,” he said of the men he encounters in prison. “So they decide on Islam and that becomes their life.”

But last week, Mr. Muhammad found himself an accidental actor of sorts in the latest case of what the authorities call a homegrown terror plot, one in which four ex-convicts were accused of trying to blow up two Bronx synagogues and attack military aircraft. The plot, the authorities say, began when one of the men met a government informant at Mr. Muhammad’s mosque roughly a year ago.

With at least two of the men appearing to be prison converts to Islam, the case has in certain circles evoked an old debate about the role prison might play as an incubator of extremist ideas among Muslims, and it put Mr. Muhammad in the position of confronting that debate in a very personal way.

Mr. Muhammad said his years working with Muslims in prison had turned up little actual evidence that many or any of them became radicalized behind bars.

“I don’t hear any of that wild stuff,” he said. “And if I did hear it, I would stomp it out. It is totally un-Islamic.”

The authorities have made no overt claim that the four suspects — James Cromitie, Onta Williams, David Williams IV and Laguerre Payen — hatched a plot in jail or that their experiences behind bars led to their alleged acts. In fact, it is uncertain just how much of a role their faith played in their motivation.

What is clear is that the men were all initially described by the authorities and some family members as Muslim, and all had served time in prison. In the case of Mr. Cromitie, he even served time at the Fishkill Correctional Facility in Beacon, N.Y. — the very prison where Mr. Muhammad works. He also was said to have occasionally attended the mosque in Newburgh, where Mr. Muhammad serves as imam.

Mr. Muhammad said he did not know Mr. Cromitie from prison. He said a former Fishkill inmate who did know Mr. Cromitie said he did not take part in the Muslim circle there. Maybe 300 to 400 inmates there are on record as Muslim, but only about 150 regularly come to services, he said.

Other Muslim prison chaplains sought to quash the idea that prison, where most of the Muslims are African-American, breeds Islamic extremism.

“Guys in prison are no more vulnerable than other people in society,” said Imam Talib Abdur-Rashid, a chaplain in the New York City prisons who is also the imam of the Mosque of Islamic Brotherhood in Harlem. “These are just isolated cases. The direction of Islam in prison remains reformation and community upliftment and that type of thing.” He continued, “If the guy was an unreformed sociopath who happens to be a Muslim, that’s the case. His Islam is not to blame for his condition.”

There was serious concern about the issue five years ago when a Muslim chaplain, Warith Deen Umar, who ran New York State’s Islamic chaplaincy program, was reported to have praised the Sept. 11 attacks. That led members of Congress to call for an investigation of Islam in the nation’s prisons.

The Justice Department’s inspector general issued a report in 2004 faulting the prison system for failing to protect against “infiltration by religious extremists.” But it said the problems rested not so much with radical chaplains but unsupervised inmates leading their own worship services.

The federal Bureau of Prisons said Friday that it had taken steps to monitor attempts to radicalize prisoners, better vet the people who conduct inmate religious services, expand chaplain training and screen written materials. While the potential for radicalization is there, “we see no evidence that inmates are being converted to Islam by extremists in federal prisons,” said a spokeswoman, Traci L. Billingsley.

The fomenting of extremist ideas among Muslims is not a problem in the New York State prison system, said Erik Kriss, a spokesman for the Department of Correctional Services. “We have a zero-tolerance policy for any chaplain advocating violence or extremist beliefs,” he said. The department holds meetings with chaplains to remind them of that, monitors religious literature coming in, and videotapes, audiotapes or sends guards to services, he said. In the past several years, the department removed from prison libraries an English version of the Koran that had commentary advocating violence to spread Islam, he said.

Islam is the fastest-growing religion in the prison system. About 30,000 to 40,000 conversions among federal prisoners take place each year, according to a study for the Justice Department by Mark S. Hamm, a criminologist at Indiana State University. About 6 percent of the nation’s 173,000 federal prisoners are Muslim.

Mr. Hamm’s study, published in December 2007, says that most inmates convert in prison for one of five main reasons: because they are in personal crisis, seek a spiritual dimension, are looking for a group to protect them, want to manipulate the system or are influenced by the outside world.

He concludes that generally, “there is no relationship between prisoner conversions to Islam and terrorism.” The danger lies, he said in an interview Friday, in “prison Islam,” which he identified as “small gang-like cliques that use cut-and-paste versions of the Koran” to give a religious overlay to their activities. The danger becomes acute when a member leaves prison and forms a radical cell.

Mr. Hamm said he has counted five examples of this since 2005, notably a plot hatched in a California state prison that year to attack synagogues, American military installations and Israeli officials. The four plotters belonged to a group called Jam’iyyat Ul-Islam Is-Saheeh, or the Assembly of Authentic Islam.

Far more often, Islam has been a moderating influence among felons, he said. That seems to be the case with Mr. Muhammad, who is 58. He said he came to Islam as a fatherless 13-year-old in Harlem, becoming a follower of Clarence 13X, founder of the Five Percent Nation of Islam, a strain of the black nationalist Nation of Islam.

“I was into drugs and crime,” he said. “I was something who was considered a wayward minor.”

Mr. Muhammad said he served a 12-year term for robbery in prisons including Sing Sing, where he obtained a master’s degree in theology and counseling from New York Theological Seminary. He became a leader among Muslim inmates and was released in 1984 and is now working toward a doctorate at Hartford Seminary.

Mr. Muhammad said that while in prison, he studied the teachings of W. Deen Mohammed, who preached a more racially tolerant and traditional form of the faith.

While in prison, he said, the authorities “really appreciated us because we quelled a lot of disturbances.” Compared to his experience in prison, he said that nowadays “there’s more Islamic knowledge available, the correct Islamic knowledge,” behind bars.