WASHINGTON — President Donald Trump will speak Friday at the NRA convention in Dallas, a senior White House aide confirmed Sunday night.

Vice President Mike Pence had already agreed to appear at the annual gathering of the gun rights group.

Guns have been banned for Pence's appearance and will be banned for Trump's as well. It's routine for the Secret Service to ban weapons at events attended by the president, though gun control advocates have mocked the ban, calling it hypocritical in light of the gun lobby's push to allow guns in schools and to expand the rights of gun owners.

The late addition of the NRA convention to Trump's schedule means the president plans two visits to Dallas in May. On May 14, he'll headline a fundraising dinner, after a donor lunch in Houston earlier in the day.

On Thursday, the president will meet at the White House with members of the church in Sutherland Springs, Texas, where a gunman killed 26 people in a rampage last November.

This will be Trump's third straight appearance at the NRA's annual gathering. He has projected strong support for gun rights and enjoyed close relations and backing from the NRA and its members.

But he alarmed gun rights advocates two months ago during a White House meeting on school safety when he called for confiscating guns from people with mental illness without waiting for a court order.

"I don't want mentally ill people to be having guns," he said. "Take the guns first, go through due process second."

Trump has ordered the Justice Department to ban bump stocks, the accessory used in the Las Vegas massacre last year that allows near-automatic rates of fire. Some gun enthusiasts have taken issue with that proposal, calling it an infringement on their rights and an unfair and potentially unconstitutional move to deprive them of a device they'd paid hundreds of dollars for.

The president's record of picking federal judges who support a broad interpretation of Second Amendment rights has kept him in the good graces of the powerful gun lobby. Trump has resisted most calls to restrict access to guns even after a rash of mass shootings during his tenure, including a rampage in Sutherland Springs.

The church killer had been court-martialed, but the Air Force had neglected to report his records to the federal background database.

Trump supports legislation crafted by Sen. John Cornyn to beef up reporting requirements to block gun sales to people disqualified by mental illness or criminal background — a move generally supported by gun rights groups.

With Republicans facing potentially dire setbacks in the November elections, and the prospect of losing the House and possibly the Senate, Trump's efforts to keep NRA members energized could be critical.