WASHINGTON — Donald J. Trump said Wednesday that people on the terror watch list should be barred from buying firearms, putting himself in the center of a gun-control debate in Congress revived by the worst mass shooting in United States history.

Mr. Trump’s stance, expressed in a Twitter post, does not necessarily jibe with the positions of the Republican Party and the National Rifle Association, whose endorsement Mr. Trump frequently boasts about on the campaign trail. His tweet could be read to support measures pushed by Democrats and opposed by Republicans in Congress, reflecting the unusual nuances of the issue, which touches on public safety and civil rights beyond the Second Amendment.

“I will be meeting with the N.R.A., who has endorsed me, about not allowing people on the terrorist watch list, or the no-fly list, to buy guns,” Mr. Trump, the presumptive Republican presidential nominee, wrote Wednesday morning on Twitter. His comment came three days after 49 people were killed when a gunman who pledged allegiance to the Islamic State stormed an Orlando nightclub.

On the same morning, a group of Democrats took to the Senate floor in a filibuster to protest the lack of improvement in gun safety measures in recent years.

“I’ve had enough,” said Senator Christopher S. Murphy, Democrat of Connecticut, who spoke on and off for more than 14 hours. “I couldn’t just come back to the Senate this week and pretend like this is business as usual.”

When he finished talking shortly after 2 a.m. on Thursday, Mr. Murphy said he had secured agreement for votes on the measures.