NEW YORK — U.S. Muslims say they have experienced widespread suspicion about their faith in the first months of Donald Trump’s presidency, but also have received more support from individual Americans, and remain hopeful they can eventually be fully accepted in American society, a new survey finds.

Nearly three-quarters of U.S. Muslims view Trump as unfriendly to them, according to a Pew Research Center report released Wednesday. Sixty-two percent say Americans do not view Islam as part of the mainstream after a presidential election that saw a surge in hostility toward Muslims and immigrants.

At the same time, nearly half of Muslims said they had received expressions of encouragement from non-Muslims in the past year, an increase over past polls. And Muslims remain optimistic about their future. Seventy percent believe hard work can bring success in America, a figure largely unchanged for a decade.

“There’s a sense among the American Muslim population that others are beginning to understand them and beginning to sympathize with them,” said Amaney Jamal, a Princeton University political scientist and adviser to Pew researchers. Prejudice against Muslims has “pushed the average American to say, ‘This is really not fair. I’m going to knock on my neighbor’s door to see if they’re all right,’” Jamal said.

The Pew survey is its third on American Muslims since 2007, and its first since Trump took office Jan. 20.

He promised to fight terrorism through “extreme vetting” of refugees and had a plan to temporarily ban travelers from six Muslim-majority countries.

The latest poll of 1,001 adults was conducted by phone, both landline and cellphones, between Jan. 23 and May 2, in English, Arabic, Farsi and Urdu, and has a margin of error of plus or minus 5.8 percentage points.

The last several months have seen an uptick in reports of anti-Muslim harassment, including arson and vandalism at mosques and bullying at schools.

In the Pew survey, nearly half of U.S. Muslims say they have faced some discrimination in the last year, such as being treated with distrust, threatened or called an offensive name. That percentage is only a slight increase over previous surveys.

However, the figure is much higher for respondents who said they were more visibly identified as Muslim, for example by a head covering, or hijab, for women. Sixty-four percent of those with a more distinct Muslim identity said they had recently faced some type of discrimination.