WASHINGTON Most Americans reject Donald Trump's proposal to build a wall along the U.S. border with Mexico and his support for deporting those in the country illegally. But they're divided on the presumptive Republican nominee's proposed temporary ban on the entry of Muslims from other countries, a new survey finds.

The poll shows Trump's shifting rhetoric on that ban might win some Americans over.

When it comes to Trump's proposal to build a wall along the Mexican border, about 6 in 10 Americans oppose the idea while 4 in 10 are for it, the new Associated Press-GfK poll indicated.

Similarly, 6 in 10 Americans favor providing a way for immigrants who are in the country illegally to become U.S. citizens, while about 4 in 10 are opposed.

Seventy-six percent of Democrats, along with 44 percent of Republicans, favor a path to citizenship for immigrants in the country illegally. Among Trump's supporters, just 38 percent are in favor of a path to citizenship. Sixty-seven percent of Republicans and just 21 percent of Democrats favor a border wall. Three-quarters of Trump's supporters favor that proposal.

Trump's likely rival, Democrat Hillary Clinton, has cast his calls for the border wall and temporary foreign Muslims ban as dangerous.

Trump supporter Marile Womack, 79, of Debary, Florida, adamantly favors the border wall. No one else "had the guts to do it," she said. But the daughter of Austrian immigrants isn't opposed to immigration from any country so long as it's done legally.

"I don't favor banning immigrants, but I am for investigating them before they come," she said.

In contrast, Mark Wecker, a car salesman from Redding, California, called a border wall stupid, because "it's a lot of money and it's not going to keep them out if they want to get in."

Three-quarters of Latinos, two-thirds of African-Americans and more than half of whites favor providing a path to citizenship. Forty-eight percent of whites, 26 percent of blacks and just 16 percent of Latinos favor a border wall.

Daniella Gil, a stay-at-home-mom from Cornelius, Oregon, who is the daughter of Mexican immigrants, said, "We should be focusing on the violence coming from Syria as opposed to Hispanics jumping the border."

She said she supports immigration from any country so long as it's done legally.

Americans are slightly more likely to oppose than favor a temporary ban on Muslims who are not U.S. citizens from entering the United States, by a 52 percent to 45 percent margin that has been strikingly consistent in AP-GfK polls conducted this year.

Sixty-nine percent of Republicans say they favor the temporary ban on Muslim immigration, while 68 percent of Democrats are opposed. Half of whites and just a third of non-whites say they favor the ban. Seventy-six percent of Trump supporters are in favor.

On a trip to Scotland last month, Trump shifted his rhetoric, saying he would instead "want terrorists out" of the U.S., and to do so, he would limit people's entry from "specific terrorist countries and we know who those terrorist countries are."

The poll indicates that rhetorical shift could win support. Among those asked more broadly about a temporary ban on immigrants from areas of the world where there is a history of terrorism against the U.S. or its allies, 63 percent are in favor and 34 percent opposed. Ninety-four percent of Trump supporters say they favor this proposal, as do 45 percent of Clinton supporters.

"That's a necessity for creating stability," said Ryan Williams, 40, a health care provider from Jacksonville, North Carolina.

Most Americans - 53 percent - think the United States is currently letting in too many refugees from Syria, engulfed in civil war since 2011 and the Islamic State militant group's de facto center. President Barack Obama has pledged to admit some 10,000 Syrian refugees this year.

Another 33 percent think the current level is about right, while just 11 percent want to let in more. About 4 in 10 think there's a very or somewhat high risk of refugees committing acts of religious or political violence in the United States, 34 percent think the risk moderate, and 24 percent consider it very or somewhat low.

Seventy-six percent of Republicans think the U.S. should allow fewer refugees. Among Democrats, 43 percent think the current level is about right, 38 percent think the U.S. should allow fewer, and 18 percent want to allow more.

Said Gil, the stay-at-home mom from Oregon, "Some of those people are innocent kids."

The AP-GfK Poll of 1,009 adults was conducted online July 7-11, using a sample drawn from GfK's probability-based KnowledgePanel, which is designed to be representative of the U.S. population. The margin of sampling error for all respondents is plus or minus 3.3 percentage points.

Respondents were first selected randomly using telephone or mail survey methods and later interviewed online. People selected for KnowledgePanel who didn't have access to the Internet were provided access for free.