WASHINGTON (Reuters) - U.S. President Donald Trump said on Wednesday his administration would seek to close background check loopholes for gun purchases after Democrats accused him of reversing course on gun control measures.

Trump spoke with the leader of the National Rifle Association lobbying group, Wayne LaPierre, on Tuesday, a White House official said. Speaking to reporters outside the White House, Trump said he did not tell LaPierre, whose group strongly opposes increased gun restrictions, that he would avoid pursuing measures on background checks.

Trump, who was endorsed by the NRA in the 2016 presidential race, said he views the number of U.S. gun deaths as a public health emergency and reiterated his belief that people who are mentally ill should not be allowed to buy guns.

“We’re working on background checks. There are things we can do. But we already have very serious background checks. We have strong background checks. We can close up the gaps. We can do things that are very good and things that frankly gun owners want to have done,” Trump said.

“We have background checks but there are loopholes in the background checks. And that’s what I spoke to the NRA about yesterday. They want to get rid of the loopholes as well as I do. At the same time, I don’t want to take away people’s Second Amendment rights,” Trump added later.

On Tuesday, Trump, a Republican, said his administration was engaged in meaningful talks with Democrats, who control the U.S. House of Representatives, about gun legislation after gunmen in El Paso, Texas, and Dayton, Ohio, killed 31 people using semi-automatic rifles and high-volume magazines earlier this month.

Congressional aides, however, said the discussions have been low-level and generally unproductive.