WASHINGTON -- Americans were outraged to learn they were being spied on by the National Security Agency, but many support law enforcement profiling of Muslims, according to a poll released Tuesday by the Arab American Institute.

The survey, conducted by Zogby Analytics for the advocacy group, found that 42 percent of Americans believe law enforcement is justified in using profiling tactics against Muslim-Americans and Arab-Americans. The survey also shows American attitudes toward Arab-Americans and Muslim-Americans have turned for the worse since the Arab American Institute first began polling on the subject in 2010. The new poll found favorability toward Arab-Americans at 36 percent, down from 43 percent in 2010. For Muslim-Americans, favorability was just 27 percent, compared with 36 percent in 2010.

Recent news headlines associated with Muslims have focused on the ongoing civil war in Syria; the rise of ISIS, or the Islamic State in Iraq and Levant, in Iraq; the abduction of Nigerian schoolgirls by the Islamist group Boko Haram; and the 2012 terrorist attack on a U.S. diplomatic mission in Benghazi, Libya.

"The way forward is clear," the pollsters wrote in the survey's executive summary. "Education about and greater exposure to Arab Americans and American Muslims are the keys both to greater understanding of these growing communities of American citizens and to ensuring that their rights are secured."

The poll found a growing number of Americans doubt that Muslim-Americans or Arab-Americans would be able to perform in a government post without their ethnicity or religion affecting their work. Thirty-six percent of respondents felt that Arab-Americans would be influenced by their ethnicity, and 42 percent said Muslim-Americans would be influenced by religion.

Results differed by political party, with the majority of Republicans holding negative views of both Arab-Americans and Muslims. Democrats gave Arab-Americans a 30 percent unfavorable rating and Muslim-Americans a 33 percent unfavorable rating, while Republicans gave Arab-Americans a 54 percent unfavorable rating and Muslim-Americans a 63 percent unfavorable rating.

Similarly, Republicans were more likely to think that Arab-Americans and Muslim-Americans unable to hold a role in government without being influenced by ethnicity or religion. Fifty-seven percent of Republicans said they believed Muslim-Americans would be influenced by their religion, while half said the same for Arab-Americans. Almost half of Democrats said they were confident Muslim-Americans and Arab-Americans could do their jobs without influence.

The survey also showed a generational gap in attitudes toward Arab-Americans and Muslim-Americans, with younger respondents showing more favorability toward both groups. Part of that, according to the pollsters, has to do with exposure -- those ages 18 to 29 were likely to know Arab-Americans or Muslim-Americans, while respondents older than 65 were almost evenly split on that question.

Previous polls also have shown Americans holding a cold view of Muslims. A Pew poll this month found that Muslims were perceived as negatively as atheists.

The Arab American Institute survey was conducted online among 1,110 likely U.S. voters from June 27 to June 29, a period of unrest in the Muslim world.