WASHINGTON (Reuters) – President Donald Trump on Friday urged “common sense” solutions to address gun violence after recent mass shootings but added that the views of the powerful National Rifle Association, which has long opposed gun control, should be considered.

Following attacks last weekend that killed 31 people in El Paso, Texas, and Dayton, Ohio, and reignited the national debate on gun policy, Trump said the United States needs meaningful background checks “so that sick people don't get guns.”

“Frankly, we need intelligent background checks. This isn't a question of NRA, Republican or Democrat,” he told reporters at the White House.

The NRA – one of the most powerful lobbies in the United States and a frequent contributor to Republican politicians – has for decades opposed gun control efforts.

Pressure from the group helped force the Republican president to back down on supporting tighter gun laws last year despite national outrage at the fatal shootings of 17 people at a high school in Parkland, Florida.

Trump said on Friday that many attempts to restrict gun ownership have stalled in Congress in the past “but there's never been a president like President Trump.”

“I have a great relationship with the NRA,” he said.

As he considers whether to persuade Republicans in Congress to back new measures, Trump also has to ensure he does not lose support of pro-gun rights conservatives as he runs for re-election next year.

“I am the biggest Second Amendment person there is, but we all must work together for the good and safety of our Country,” he wrote on Twitter. “Common sense things can be done that are good for everyone.”

Trump said he had “been speaking to the NRA, and others, so that their very strong views can be fully represented and respected.” The NRA, in a statement on Thursday, indicated it opposed further gun restrictions.

Democrats are trying to galvanize public support for legislative action over what has been a contentious issue for years, even before Trump's administration. Since he became president in 2017, there have been mass shootings at a church in Texas, a concert in Las Vegas and high schools in Florida and Texas.

Trump earlier this week initially appeared to support background checks but then did not mention them in a public address on Monday that focused on mental illness and media culture. He later predicted congressional support for those background checks and blocking gun access to the mentally ill, but not for any effort to ban assault rifles.

Congress is in recess but Trump said on Friday that leaders of the House of Representatives and Senate were discussing expanding background checks for guns sales.

Republican Senate leader Mitch McConnell on Thursday rejected a plea from more than 200 mayors to call the Senate back early to consider gun legislation.

House Speaker Nancy Pelosi and Senate Democratic Leader Chuck Schumer said they had each spoken separately to Trump and that he had assured them he would review legislation that has already passed the Democratic-majority House.

The White House also will hold a meeting with representatives from the technology industry on Friday to discuss violent extremism online.

Trump is not scheduled to be at the White House for most of the day as he attends a fundraiser in the Hamptons in New York for his 2020 re-election campaign.

(Reporting by Roberta Rampton and Jonas Ekblom; Additional reporting by Susan Heavey, Humeyra Pamuk; and Richard Cowan; Writing by Alistair Bell; Editing by Bill Trott)