DALLAS, Oct. 22  A federal judge declared a mistrial on Monday in what was widely seen as the government’s flagship terrorism-financing case after prosecutors failed to persuade a jury to convict five leaders of a Muslim charity on any of the charges, or even to reach a verdict on many of the 197 counts.

The case, involving the Holy Land Foundation for Relief and Development and five of its backers, is the government’s largest and most complex legal effort to shut down what it contends is American financing for terrorist organizations in the Middle East. President Bush announced he was freezing the charity’s assets in December 2001, saying that the radical Islamic group Hamas had “obtained much of the money it pays for murder abroad right here in the United States.”

But at the trial, the government did not accuse the foundation, which was based in a Dallas suburb, of paying directly for suicide bombings. Instead, the prosecution said, the foundation supported terrorism by sending more than $12 million to charitable groups, known as zakat committees, which build hospitals and feed the poor.

The prosecution said the committees were controlled by Hamas and contributed to terrorism by helping Hamas spread its ideology and recruit supporters. The government relied on Israeli intelligence agents, using pseudonyms, to testify in support of this theory.