WASHINGTON — A majority of Americans support allowing immigrants living in the country illegally to stay and be granted legal status, according to a new poll released Thursday.

The survey conducted by the Pew Research Center found that 72 percent of Americans support legal status for such immigrants.

The poll found that 56 percent of Republicans agree that immigrants living in the U.S. illegally should be able to stay as long as they meet certain criteria, as did 8 in 10 Democrats and three-quarters of independents. The poll question did not specify what those requirements might be.

At the same time, 63 percent of Republicans also say, when asked to choose, that immigrants – those in the U.S. legally and illegally – are a burden on the country, while 27 percent say they strengthen the country.

Among Americans overall, more say that immigrants strengthen the country (51 percent) than say they burden the country (41 percent).

The Pew survey also found that about half of Americans think a lot more can be done to secure the nation’s border. Border security is a common starting point among many Republicans for any plan to overhaul the country’s immigration system.

Asked to specify which they support, 42 percent of Americans said that immigrants currently in the United States illegally should be allowed to apply for citizenship, while 26 percent said they should be able to apply for permanent residency, not citizenship.

The distinction between those options could be important over the course of the presidential campaign, with Hillary Clinton supporting a path to citizenship and some Republicans stopping at offering legal residency.

The Pew survey was conducted by telephone using landline and cellphones among 2,002 adults between May 12 and May 18. The poll’s margin of error was plus or minus 2.5 percentage points.