REPUBLICAN presidential candidate Donald Trump was safe on Sunday after what the FBI said appeared to be a second assassination attempt while he was golfing on his course in West Palm Beach, Florida.

Law enforcement officials said U.S. Secret Service agents spotted and fired on a gunman in some bushes near the property line who dropped an AK-47-style assault rifle and was arrested after fleeing the scene.

The New York Times and Fox News identified the suspect as Ryan Wesley Routh, 58, of Hawaii, citing unnamed law enforcement officials.

The FBI declined to comment on the suspect’s identity, and other law enforcement agencies involved did not respond to requests for comment.

After spotting the rifle barrel about 400 to 500 yards (365 to 457 meters) away from Trump as they cleared holes of potential threats ahead of his play, the agents engaged the gunman and fired at least four rounds of ammunition around 1:30 p.m. (1730 GMT), Palm Beach County Sheriff Ric Bradshaw told a news conference.

The gunman then dropped his rifle, two backpacks and other items and fled in a black Nissan car. A witness, the sheriff said, saw the gunman and managed to take photos of his car and license plate.

“The Secret Service did exactly what should have been done,“ Bradshaw added.

After the suspect fled the scene, law enforcement officials said they sent out an alert to statewide agencies with the information on his vehicle, which led to sheriff’s deputies in neighboring Martin County apprehending the suspect on I-95.

“We have somebody in custody right now,” said Bradshaw, who did not identify the suspect or give details on a possible motive.

Trump sent an email to his fundraising list saying there were “gunshots in my vicinity, but before rumors start spiraling out of control, I wanted you to hear this first: I AM SAFE AND WELL!” according to an email seen by Reuters.

Trump was injured in an assassination attempt in Pennsylvania on July 13, raising questions about protection for candidates just months ahead of what looks likely to be highly contested Nov. 5 election in which he will face off against Democratic Vice President Kamala Harris.

The White House said in a statement that President Joe Biden and Vice President Kamala Harris had been briefed about the incident and were relieved to know that he is safe.

“Violence has no place in America,“ Harris said in an X social media post.

Trump’s running mate in the presidential election, U.S. Senator JD Vance, said he spoke to Trump after the shooting and that the former president was in good spirits.

The first shooting of a U.S. president or major party presidential candidate in more than four decades was a glaring security lapse that forced Kimberly Cheatle to resign as Secret Service director under bipartisan congressional pressure.

Trump was grazed in the right ear and one rallygoer was killed in the gunfire. The gunman, identified as a 20-year-old Thomas Crooks, was shot and killed by a Secret Service sniper.

The Secret Service’s new acting director said in August that he was “ashamed” of a security lapse that led to the assassination attempt.