And how Americans may have lost their lives as a result.

A Muslim legal group, girded with $1.8 million in grant money from George Soros's Open Society Foundations (OSF), has helped influence major policy changes in the war on terror, including the Department of Homeland Security's screening of individuals with suspected terror ties and the FBI's training program for its agents working in counterterrorism.

Internal records, made public by the hacking group DC Leaks, show OSF spent $40 million between 2008 and 2010 on programs aimed at weakening U.S. counterterrorism policy.

Muslim Advocates' Executive Director Farhana Khera played a key role in shaping the foundations' spending. Khera co-authored a 2007 memo that "informed" the foundations' U.S. Programs Board's decision to create the National Security and Human Rights Campaign (NSHRC), a Sept. 14, 2010 OSF document discussing the program's reauthorization, shows.

Closing Guantanamo Bay, eliminating torture and methods such as the extraordinary rendition of prisoners, and ending the use of secret prisons;

Ending warrantless and "unchecked" surveillance;

Ensuring that anti-terrorism laws and law enforcement activities do not target freedom of speech, association or religious expression;

Reducing ethnic and religious profiling of people of Muslim, Arab or South Asian extraction;

Decreasing secrecy and increasing oversight of executive actions, and expose U.S. government or private individuals who abuse or violate the law.

Some of these policies, such as closing Guantanamo and ending enhanced interrogation techniques, already were also advocated by Obama administration. OSF claimed its work laid the groundwork for implementing those policies. The Edward Snowden leaks cast light on the depth of the government's warrantless surveillance activity. The other goals are more difficult to assess.

Muslim Advocates was founded in 2005 as an offshoot of the National Association of Muslim Lawyers. It often criticizes U.S. counterterrorism strategies that use sting operations and informants as discriminatory.

A funders' roundtable created by OSF in 2008 helped coordinate the grant making among several left-leaning foundations, " in order to "dismantle the flawed 'war on terror' paradigm on which national security policy is now based." At least "two dozen" foundations participated in the roundtable's strategy sessions as of the end of 2008.

"It's amazing that one foundation donated an amount that CAIR and [Muslim] Advocates say is the huge sum of money that funds the entire anti-jihad campaign," Jasser said. "... That wasn't from one foundation. That was an addition of [the money given to] everybody that they threw under the bus."

By contrast, OSF and Atlantic Philanthropies spent $41.5 million in just three years. OSF dedicated another $26 million to the NSHRC program from 2011-2014.

OSF additionally funded a study by the New America Foundation equating the terror threat posed right-wing extremists with al-Qaida. An Oct. 17, 2011 memo discussing NSHRC grants notes that New America received $250,000, partly to write two reports. The first aimed at creating a "'safe space' in which Muslims in America feel free to hold controversial political dialogues, organize without fear of unwarranted government surveillance." The second aimed to "correct mistaken public beliefs that Al-Qaeda's brand of terrorism is unique to Islam and that most terrorists are Muslim."

The paper promised "to show how adherents of each extremist ideology use different language to justify very similar political means and goals. By demonstrating parallels among militant groups, this paper will aim to separate politically focused terrorism from the religion of Islam."

Arguments from this report continue to help frame how Democrats and their allies talk about the jihadist threat. New America's statistics and arguments recently came up in a House hearing about the threat from homegrown Islamic terrorists.

"According to the New America Foundation, there have been more incidents of right-wing extremist attacks in the United States than violent jihadist attacks since 9/11. I'm not minimizing jihadist attacks. In that light, can you explain what your office plans to do with respect to domestic right-wing extremism?" Rep. Bill Pascrell, D-N.J., askedDepartment of Homeland Security Office of Community Partnerships Director George Selim during a House subcommittee hearing last month.

New America's effort to conflate right-wing extremists with al-Qaida glossed over a major difference – namely al-Qaida's reliance on mass casualty attacks and suicide bombings.

New America's latest data shows that jihadists have killed more people since 9/11 than right-wing extremists.

"What you've uncovered is the fact ... that the Soros foundation works to obfuscate on national security," Jasser said. "Muslim Advocates clearly is a prime example of the sickness in Washington related to dealing with the central reforms necessary to make within the House of Islam.

"You'll see that the Soros foundation is spending money on organizations that deny the very principles they are defenders of, which are feminism, gay rights, individual rights. Muslim Advocates' entire bandwidth is spent on attacking the government and blocking any efforts at counterterrorism."

Muslim Advocates also opposes discussion on reform within the Muslim community and supports those who have theocratic tendencies, Jasser said.

"You have evidence here that the Soros foundation is part and parcel of the reason for the suffocation of moderation voices – reformist voices – in Islam," Jasser said. "Muslim Advocates really ought to change their name to Islamist Advocates, and what the Soros foundation really is doing is just advocating for Islamists."

OSF also contributed $150,000 in 2011 and $185,000 in 2012 to a donor advised fund run by Rockefeller Philanthropy Advisors. It used this money to pay Hattaway Communications, a consulting firm run by former Hillary Clinton adviser Doug Hattaway, to develop a messaging strategy for Muslim Advocates and similar organizations. Hattaway's message strategy painted Muslims as victims of American national security policies.

Khera used Hattaway's strategy to paint the New York Police Department's mosque surveillance strategy as "discriminatory."

"Their only 'crime' is that they are Muslim in America," Khera wrote in a June 6, 2012 op-ed posted on CNN.com.

OSF funded groups, including Muslim Advocates, the ACLU, and the Center for Constitutional Rights, filed lawsuits challenging the NYPD's surveillance program as unconstitutional. Police Commissioner William Bratton ended the policy in 2014.

The NYPD monitored almost all aspects of Muslim life ranging from mosques and student associations, to halal butcher shops and restaurants to private citizens. A federal district court dismissed the suit, but the Third Circuit Court of Appeals revived it in October 2015. New York settled the lawsuit in January, placing the NYPD under supervision of an independent observer appointed by City Hall.

Downplaying Radicalization and the Jihadist Threat

OSF accused conservative opponents of "borrowing liberally from Joe McCarthy's guilt by association tactics." It complained in a Sept. 14, 2010 memo to its U.S. Programs Board that the "homegrown terrorism narrative" resulted in "discriminatory" targeting of Muslims by the Department of Homeland Security (DHS) and the FBI.

Khera often expresses similar sentiments. She accused the FBI of engaging in "entrapment operations" to target "innocent" Muslims after former Attorney General Eric Holder called sting operations an "essential law enforcement tool in uncovering and preventing terror attacks."

She and her organization played a central role in late 2011 when Muslim groups called on the Obama administration to purge FBI training materials that they deemed offensive. FBI counterterrorism training materials about Islam contained "woefully misinformed statements about Islam and bigoted stereotypes about Muslims," she complained in a Sept. 15, 2011 letter. She objected to describing zakat – the almsgiving tax mandate on all Muslims – as a "funding mechanism for combat."

Yet numerous Muslim commentators describe zakat as a funding mechanism for jihad. A footnote for Surah 9:60 found in "The Meaning of the Holy Qur'an," says that zakat can be used to help "those who are struggling and striving in Allah's Cause by teaching or fighting or in duties assigned to them by the righteous Imam, who are thus unable to earn their ordinary living."

The Assembly of Muslim Jurists in America issued a 2011 fatwa saying zakat could be used to "support legitimate Jihad activities."

Following Khera's letter, then-White House counterterrorism advisor John Brennan announced a review of "CVE-related instruction across all levels of government." This review resulted in a purge of 700 pages of material from 300 presentations. This included PowerPoints and articles describing jihad as "holy war" and portraying the Muslim Brotherhood as group bent on world domination.

The Muslim Brotherhood's bylaws describe these ultimate ambitions and imply the need for violence: "The Islamic nation must be fully prepared to fight the tyrants and the enemies of Allah as a prelude to establishing an Islamic state."

Khera's influence with the Obama administration

Khera enjoys close connections with the Obama White House. Visitor logs show that Khera went to the White House at least 11 times.

Khera played a central role persuading the Obama administration to purge Department of Homeland Security records related to individuals and groups with terror ties, former Customs and Border Patrol (CPB) Agent Phil Haney told the Investigative Project on Terrorism.

His superiors ordered him to "modify" 820 CPB TECS records about the Muslim Brotherhood network in America, Haney said. Irrefutable evidence from the 2008 Holy Land Foundation (HLF) Hamas financing trial proved that many of these groups and individuals assisted Hamas, Haney said.

The HLF trial substantiated deep connections between American Islamist groups such as the Islamic Society of North America, the Council on American Islamic Relations (CAIR) and a Hamas-support network created by the Muslim Brotherhood in the United States.

A 2009 OSF funding document claims credit for helping persuade then-Secretary of Homeland Security Janet Napolitano to order a review of border screening procedures. It also reveals that Muslim Advocates worked with "DHS staff to develop a revised border policy."

The Muslim Advocates' report recommended the "review and reform of ... [Customs and Border Patrol policies and practices that target Muslim, Arab and South Asian Americans for their First Amendment protected activities, beliefs and associations; and ... law enforcement and intelligence activities that impose disparate impacts on Muslim, Arab and South Asian communities." It also asked DHS to prevent CPB agents from probing about political beliefs, religious practices, and contributions to "lawful" charitable organizations.

Muslim Advocates claimed a pivotal role in getting the Transportation Security Administration (TSA) to reverse a new 2010 policy enhancing the screening on travelers from 14 countries, many of them predominately Muslim. The rule was proposed in the wake of the attempt by underwear bomber Umar Farouk Abdulmutallab to blow up a Detroit-bound plane weeks earlier.

Muslim Advocates and several OSF grantees met with Napolitano and other top DHS officials, and the policy was canceled three months later. Muslim Advocates claimedthat the Obama administration "made special mention" of its role in reversing the TSA policy.

"This broke into the open with the great purge of 2011 and 2012," Haney said, recalling Brennan's letter to Khera announcing that materials she complained about would be removed.

The purge accompanied a practice of meeting with Islamist groups as community partners, Haney said.

In addition to the purge of training material, documents related to people and groups with terrorism ties such as Canadian Muslim Brotherhood leader Jamal Badawi and the Pakistan-based Tablighi Jamaat movement also disappeared from CPB records. (Tablighi Jamaat often serves as a de facto recruiting conduit for groups such as al-Qaida and the Taliban.)

Investigators might have had a better chance of thwarting the San Bernardino and the June Orlando shootings had those Tablighi Jamaat records remained available, Haney said, because the shooters' respective mosques appeared in the deleted 2012 Tablighi Jamaat case report.

The Obama administration's "absolute refusal to acknowledge that individuals who are affiliated with networks operating here in the United States, and their deliberate deletion of any evidentiary pieces of information in the system, has made us blind and handcuffed," Haney said. "The proof of it is San Bernardino and Orlando.

"They obliterated the entire [Tablighi Jamaat] case as if it never existed."

Haney's claims have met with some skepticism. Haney stands by his claims and says critics "made a lot of factual errors."

Still, Muslim Advocates' success reversing the TSA policy was among the accomplishments showing that it "has proved itself to be an effective advocate on the national stage," an April 25, 2011 OSF document said. It recommended renewing a $440,000 grant to "support the core operating costs of Muslim Advocates."

In doing so, the Soros-funded OSF weakened U.S. national security and potentially left it vulnerable to the jihadi attacks we have been seeing in the homeland since the 2013 Boston Marathon bombing.