The visitor was seeking humanitarian assistance for war victims in Afghanistan. So Sacramento Muslims did what they routinely do when presented with a good cause: They gave money.

They were lied to. The man touring mosques in Sacramento and elsewhere in the United States in the early 1990s, claiming to raise money for widows and orphans, was actually financing terrorism.

The man wasn't just any fund-raiser, either. He was Dr. Ayman al Zawahiri, then the leader of the Egyptian Islamic Jihad and now the right-hand man of accused terrorist Osama bin Laden.

Traveling under an alias, al Zawahiri is believed to have raised roughly $500,000 in the United States for such activities as the 1995 bombing of the Egyptian Embassy in Pakistan, according to terrorism expert Peter Probst. Al Zawahiri raised $3,000 to $4,000 at Sacramento's Masjid Annur mosque, said Metwalli Amer, a prominent Sacramento Muslim who unwittingly helped host al Zawahiri's trip to the city.

Al Zawahiri's U.S. fund-raising success illustrates the dilemma facing American Muslims--and the problems confronting the Bush administration as it tries to crack down on bin Laden's financial network.

Giving to charity is one of the foundations of Islam, and much of bin Laden's money comes from Islamic charities and other nonprofit groups in the United States and abroad, experts say. Although some donors knowingly support terrorists, most are in the dark, experts say. Some charities cover their ties to terrorists by funding schools, ambulance corps and the like, complicating shutdown efforts and generating confusion among donors.

"I'm trusting, and sometimes it shakes my trust," said Amer, a college professor who runs an organization called the Sacramento Area League of Associated Muslims. "You bring people here and you don't know if they have a hidden agenda."

Farouk Fakira, president of Masjid Annur--the Sacramento mosque that hosted al Zawahiri in the early 1990s -- said the mosque demands to see paperwork confirming a charity's federal nonprofit status before allowing any fund-raisers. Fakira said these safeguards preceded the Sept. 11 terrorist attacks. "Most of the people are very wary," he said. "There are a lot of scam organizations."

Fakira, who came to Sacramento in 1995, said he wasn't familiar with reports of al Zawahiri's visit to the mosque.

The Sept. 11 attacks have hurt Muslim giving. Muslims are expected to donate annually 2.5 percent of their savings to charity, but many in America have scaled back after the terrorist attacks, said Aslam Abdullah, editor of Minaret Magazine, an Islamic publication in Los Angeles. One reason is they're unsure where the money's going, he said.

Sorting out the good from the bad also raises problems for federal investigators. In its effort to cut off funding to bin Laden's network, the Bush administration has run into diplomatic difficulties by including on its list of targets some charities known for their good works. The Rabita Trust, for instance, has ties to the Saudi government and was established by the Pakistani government to resettle refugees from Pakistan's war against Bangladesh.

While there are many legitimate Islamic charities, experts say some groups are mere fund-raising fronts for terrorism. Others are legitimate organizations that have been infiltrated by terrorist sympathizers who siphon funds, said Raphael Perl, a terrorism analyst at the Library of Congress' Congressional Research Service. Still others do genuine humanitarian work but deliberately funnel some of their donors' money to terrorists, Perl said.

"There is both intentional and accidental leakage" of funds, Perl said. That adds to the difficulty of cutting the flow of funds. Hezbollah and Hamas, two high-profile Mideast terrorist organizations, have plenty of U.S. donors in part because they provide essential social services in a region of the world where governments usually fail to deliver, said Probst, a former terrorism analyst at the Pentagon and Central Intelligence Agency.

"Both Hezbollah and Hamas have schools for children and do take care of the widows and orphans," said Probst, who is now with the Institute for Terrorism and the Study of Political Violence. "They provide the social safety net...a chicken in every pot."

The Justice Department's crackdown on a suburban Chicago organization called the Quranic Literacy Institute illustrates the complexities of trying to track terrorists' funds through charities.

In 1998, the department obtained a court order freezing $1.4 million in assets belonging to the Quranic group and a man associated with it, Mohammad Salah.

An FBI agent's affidavit said Salah served a five-year prison term in Israel for funneling money to Hamas.

Salah's attorney, Matthew Piers, said his client merely sent money to families of Palestinian men deported by Israel. But Piers acknowledged the money could have been diverted to illegitimate uses by a man working with Salah.