President Trump signaled on Monday that he was willing to join a discussion on gun restrictions amid the national clamor led by teenagers who survived last week’s mass shooting at a Florida high school.
Mr. Trump is open to improvements in federal background checks for prospective gun buyers, the White House press secretary, Sarah Huckabee Sanders, said in a statement. She said the president had also spoken on Friday to Senator John Cornyn of Texas about legislation to revamp the system that the senator assisted introduce last fall.
The White House stopped short of backing the bill, but the statement was a departure for a president who has focused on the mental health of gunmen and suspects, rather than the firearms utilized in the attacks, after other mass shootings.
“While discussions are ongoing and revisions are being treated,” Ms. Sanders said, “the president is supportive of efforts to improve the federal background check system.”
The proposed legislation — introduced by Mr. Cornyn, three other Republicans and four Democrats in the Senate — would make compelling changes to the national instant criminal background check system. The bill would hold federal agencies answerable for failing to add relevant information. It would also establish an initiative to better monitor gun buyers with records of domestic abuse.
The bill was also backed by the National Rifle Association, which spent tens of millions of dollars on supporting Mr. Trump in the presidential campaign against Hillary Clinton.
But the legislation would have done small to stop the shooting last week at Marjory Stoneman Douglas High School in Parkland, Fla., that killed 17 people. The suspect, 19-year-old Nikolas Cruz, had no criminal record. He bought at least seven guns legally, including an AK-47 he had purchased in the past month, a federal law administration official said on Monday.
Mr. Cruz, who has confessed to investigators, came on Monday in a Fort Lauderdale courtroom in shackles and a red jumpsuit as lawyers contended over whether a defense motion filed last week should be kept confidential. Mr. Cruz did not look up during the brief hearing.
Several other Republicans have expressed willingness since the shooting to discuss a change in gun laws, though they have given few specifics. On Monday, Gov. Rick Scott of Florida declared he would hold meetings with state and local leaders, focusing on ways to improve school safety, expand mental health care and keep guns out of the hands of people with mental illness.
Gov. John Kasich of Ohio said on Sunday that some “small steps” should be taken on gun control, addressing background checks and mental illness. Gov. Phil Scott of Vermont said in a statement that his administration would review its procedures and policies on gun safety.
Neither suggested that change was imminent. Their remarks recalled other murmurings of change that ultimately fizzled. Congress has been marked by inflexibility on gun legislation, including a failure last year to ban so-called bump stocks, an accessory that the gunman in the October shooting in Las Vegas used to transform his semiautomatic rifles to mimic automatic weapon fire. That shooting left 58 people dead and wounded hundreds.
Students from Parkland and across the country have organized protests and marches to urge Mr. Trump and lawmakers to act. About 100 people collected in front of the White House on Monday to rally for stricter gun control. Seventeen students, representing the number of people killed in Florida, lay on the ground in protest. Parents, teachers and friends joined them on the asphalt, and high school students stood in clusters in 40-degree temperatures, chanting “Enough is enough!” and waving signs that read “Am I next?”
“I’ve been afraid to go to school since the shooting in Florida,” said Maya Galanti, a 12-year-old from Bethesda, Md., who attended the rally with her mother and two siblings. “Those students thought they were having a normal day, and we have the same chances of getting shot as they did.”
Students from the Parkland area have also lashed out at Mr. Trump on Twitter, and some were dogged when he recommended in a tweet that the shooting had occurred because the F.B.I.’s resources had been diverted to the Russia investigation.
“Seventeen innocent people were ferociously murdered at my school, a place where they should have felt safe,” one student wrote. “Their lives were gone in an instant. You are the president of the United States, and you have the audacity to put this on Russia as an excuse.”
The legislation last fall was considered a modest step toward a bipartisan compromise on gun safety.
The lead senators behind the bill — Mr. Cornyn and Chris Murphy, Democrat of Connecticut — have seen some of the worst mass shootings in United States history unfold in their states. A shooting that killed 20 first graders and six adults at Sandy Hook Elementary School in Newtown, Conn., in 2012 arrived near the begin of Mr. Murphy’s time in office, and gun restrictions became a defining problem for him. The shooting deaths of over two dozen people at a church in Sutherland Springs, Tex., in November prompted Mr. Cornyn to be a co-sponsor of the bill.
After the Texas shooting, Attorney General Jeff Sessions asked the F.B.I. to conduct an extensive review of the database because, as he said in a statement at the time, “relevant information may not be getting reported.”
In a tweet on Monday, Mr. Murphy said that the bill alone would do little to stop the what he called an “epidemic” of violence.
The president, who has spoken approvingly about gun rights over the years, has held wavering views on gun restrictions. He had a buried weapon permit in New York when Rudolph W. Giuliani was mayor, but it is not clear whether he maintained it.
In 2000, as he considered an earlier run for president, Mr. Trump wrote in his book “The America We Deserve” that “I generally oppose gun control, but I support the ban on assault weapons and I also support a slightly longer waiting period to buy a gun.”
He added, “With today’s internet technology we should be able to tell within 72 hours if a potential gun owner has a record.”
In 2016 on CNN, Mr. Trump said guns should not be permitted in classrooms, and then followed up moments later by saying that some teachers should have access to firearms.
“You look at some of our schools, astonishing what’s going on, but I’m not advocating guns in the classroom,” Mr. Trump said at the time. “Remember in some cases, a lot of people admit this, trained teachers should be capable to have guns in classrooms.”