Americans may pledge allegiance to “one nation under God,” but they are divided on whether religion is essential to national identity.

Nearly one-third of Americans view being a Christian as “very important” for being “truly American,” according to a Pew Research Center report on national identity in more than a dozen countries that was released Wednesday. About the same number (31 percent) said it was “not at all important.”

The report surveyed 14,514 people by telephone or face to face in 14 countries between April 4 and May 29, 2016, on a number of factors that could shape national identity: birthplace, language, national customs and traditions, and religion. The survey was conducted against the backdrop of the United Kingdom’s Brexit vote to leave the European Union, then-presidential candidate Donald Trump’s campaign promise to build a wall along the United States’ border with Mexico (since enshrined in an executive order by President Trump) and growing support for populist parties in several European countries.

Religion ranked last in determining nationality for Americans, with 51 percent responding it was at least somewhat important to be a Christian to be truly American. Pew specifically asked about Christianity, as nearly 71 percent of the U.S. population identified as Christian in 2014, according to the report.

It followed speaking English (92 percent), sharing American customs and traditions (84 percent) and having been born in the U.S. (55 percent), according to Pew.

Some groups saw Christianity as more important than others. White evangelical Protestants were most likely (57 percent) to view Christianity as very important to American identity, followed by all those who said religion was very important personally (51 percent).

There were also divides by age, gender and, notably, political affiliations. More than 4 in 10 Republicans (43 percent) said Christianity is a very important part of being American, compared with 29 percent of Democrats and 26 percent of independents.

Among the 13 countries Pew asked whether Christianity or Catholicism was important to nationality (based on the most popular expression of religion in each country), a median 15 percent said it was very important to be a “true national,” according to the report.

That connection with religion was strongest in Greece (54 percent) and weakest in Sweden (7 percent).

The margin of error in Pew surveys varies by country but is 3.4 percentage points in the United States, according to Pew. Researchers surveyed 1,003 Americans by phone.