The Federal Bureau of Investigation has identified 20-year-old Thomas Matthew Crooks as the "subject involved" in the attempted assassination of former US president Donald Trump.
Crooks from Bethel Park, Pennsylvania was registered as a Republican, according to the state's voter records.
The US Secret Service confirmed that Crooks was shot dead by agents after he opened fire from the roof of a building about 140 metres from the stage where Trump was speaking at the campaign rally in Butler, Pennsylvania.
An AR-15-style semiautomatic rifle was recovered near Crooks' body.
Special agent in charge of the FBI's Pittsburgh field office Kevin Rojek told a media conference that authorities had not yet identified a motive.
Rojek said it was "surprising" the gunman was able to open fire on the stage before the Secret Service killed him.
But when asked if there was a failure of security, he said they were "not gonna make that assessment" with an active investigation.
A rally attendee died and two were critically injured in the incident, the FBI said.
Trump 'doing well'
The Trump campaign later said he was "doing well" and appeared to have suffered no major injury besides a wound on his upper right ear.
After the shooting, a defiant Trump said he is 'looking forward' to appearing at the Republican national convention, despite the shooting.
In a statement, the Trump campaign said the former US president "looks forward to joining you all in Milwaukee as we proceed with our convention to nominate him to serve as the 47th President of the United States."
Trump was spattered with blood when gunfire erupted at his rally on Saturday, sparking panic in the crowd.
He later posted on his Truth Social platform: "I knew immediately that something was wrong in that I heard a whizzing sound, shots, and immediately felt the bullet ripping through the skin," he said.
"Much bleeding took place, so I realised then what was happening."
In a statement posted on X, the US Secret Service said the shooter had fired multiple shots toward the stage from an elevated position outside of the rally," the statement said.
Updated FBI statement on the ongoing incident that took place today in Butler, Pennsylvania. https://t.co/MfwVeYs3kF pic.twitter.com/6fWqcTbA1S
— FBI (@FBI) July 14, 2024
Addressing the nation about two hours after the shooting, US President Joe Biden said he was relieved that Mr Trump is reportedly "doing well."
"We cannot allow this to be happening," Mr Biden said. "The idea that there's violence in America like this is just unheard of."
The attack was the most serious attempt to assassinate a president or presidential candidate since Ronald Reagan was shot in 1981. It came in a deeply polarised political atmosphere, just four months from the presidential elections and days before Mr Trump is to be officially named the Republican nominee at his party's convention - which his campaign said would proceed as planned.
'Popping sound' heard
Trump, 78, had just started his speech when the gunfire began. Screams were heard in the crowd of several thousand people.
As the shots rang out, Trump grabbed his right ear with his hand, then dropped to his knees behind the podium before Secret Service agents swarmed and covered him.
He emerged about a minute later, and could be heard saying "wait, wait," before agents ushered him to a vehicle.
The Republican candidate pumped his fist in the air as he was surrounded by security and mouthed the words, "Fight! Fight! Fight!"
President Joe Biden released a statement, expressing concern about the "sick" assassination attempt and saying he was "grateful" to hear that Trump was safe.
"I have been briefed on the shooting at Donald Trump's rally in Pennsylvania. I'm grateful to hear that he's safe and doing well," he said.
"I'm praying for him and his family and for all those who were at the rally, as we await further information. Jill and I are grateful to the Secret Service for getting him to safety.
"There's no place for this kind of violence in America. We must unite as one nation to condemn it. It's sick, it's sick".
Trump was released from the hospital and returned to his home in New Jersey.
Ron Moose, a Trump supporter who was in the crowd, described the chaos during the event.
Secret Service killed shooter
Two officials spoke to the Associated Press on the condition of anonymity. They said the shooter was not an attendee at the rally and was killed by US Secret Service agents.
The officials said the shooter was engaged by members of the US Secret Service counter-assault team and killed. The heavily armed tactical team travels everywhere with the president and major party nominees and is meant to confront any active threats while other agents focus on safeguarding and evacuating the person at the centre of protection.
Witnesses report gunshots
Ron Moose, a Trump supporter who was in the crowd, described the chaos: "I heard about four shots and I saw the crowd go down and then Trump ducked also real quick. Then the Secret Service all jumped and protected him as soon as they could. We are talking within a second they were all protecting him."
Moose said he then saw a man running and being chased by officers in military uniforms. He said he heard additional shots, but was unsure who fired them. He noted that by then snipers had set up on the roof of a warehouse behind the stage.
The BBC interviewed a man who described himself as an eyewitness, saying he saw a man armed with a rifle crawling up a roof near the event. The person told the BBC he and the people he was with started pointing at the man, trying to alert security.
"I heard about four shots and I saw the crowd go down and then Trump ducked also real quick. Then the Secret Service all jumped and protected him as soon as they could. We are talking within a second they were all protecting him."
The BBC interviewed a man who described himself as an eyewitness, saying he saw a man armed with a rifle crawling up a roof near the event.
The person told the BBC he and the people he was with started pointing at the man, trying to alert security.
CNN reported that pool reporters at the rally said they had heard "a series of loud explosions or loud bangs".
"The Secret Service went and immediately covered President Trump," according to the pool report. "Pool heard residual bangs afterward."
"Agents grabbed Trump, who was seen waving his fists in the air," the pool report added.
CNN's Alayna Treene, who was also reporting from the rally, told that network, "We heard a bunch of ... loud cracking noises. At first I thought: Is that fireworks? All of a sudden everyone started screaming."
Armed law enforcement officers were also seen on a roof near the stage where Mr Trump was standing.
The venue was abandoned with chairs knocked over and yellow police tape around the stage.
Video of what sounded like gunshots at the Trump rally.
— Alex Thompson (@AlexThomp) July 13, 2024
pic.twitter.com/3xcJxlKYrP
A helicopter flew above and law enforcement walked through the area, according to the video feed.
The US Republican leader in the Senate Senator Mitch McConnell issued statement.
"Tonight, all Americans are grateful that President Trump appears to be fine after a despicable attack on a peaceful rally. Violence has no place in our politics. We appreciate the swift work of the Secret Service and other law enforcement," he said.
Australian reactions
Prime Minister Anthony Albanese issued a brief statement.
"The incident at former President Trump's campaign event in Pennsylvania today is concerning and confronting," he said.
"There is no place for violence in the democratic process.
"I am relieved to hear reports that former President Trump is now safe."
Former Australian prime minister Scott Morrison labelled it an assassination attempt.
Saddened, shocked and appalled at the attempted assassination of President Trump. Prayers for him and his family today, as well as all those who put their own lives at risk to protect those in public life. Prayers also for America and its people, a great democracy and our great…
— Scott Morrison (@ScoMo30) July 13, 2024
Cabinet minister Tony Burke reiterated the Prime Minister's call for no violence as he also expressed his relief at Mr Trump being safe.
"It's a reminder, no matter how extra information comes through, as to how important it is that violence plays no part in any democracy," he told ABC's Insiders on Sunday.
"It's a really important reminder in the United States and in all democracies around the world."
Reactions around the world
"Laura and I are grateful that President Trump is safe following the cowardly attack on his life. And we commend the men and women of the Secret Service for their speedy response," said Republican former US president George W. Bush.
Democratic former US president Barack Obama said: "There is absolutely no place for political violence in our democracy. Although we don't yet know exactly what happened, we should all be relieved that former president Trump wasn't seriously hurt, and use this moment to recommit ourselves to civility and respect in our politics. Michelle and I are wishing him a quick recovery."
The British Prime Minister, Kier Starmer, wrote on X to share his dismay. "I am appalled by the shocking scenes at President Trump's rally and we send him and his family our best wishes. Political violence in any form has no place in our societies and my thoughts are with all the victims of this attack."
The Kremlin's spokesman Dmitry Peskov said while Russia did not believe the current US administration was responsible for the assassination attempt on Trump, it had created an atmosphere that provoked the attack. After attempts to remove Trump from the political arena using various tools, Peskov said "it was obvious to all outside observers that his life was in danger."
French President Emmanuel Macron also tweeted. "I send him my wishes for a speedy recovery. A spectator has died, several are injured. It is a tragedy for our democracies. France shares the shock and indignation of the American people."
Ukrainian President Volodymyr Zelenskyy shared a message on X. "I am appalled to learn about the shooting of former US President Donald Trump at his rally in Pennsylvania. Such violence has no justification and no place anywhere in the world. Never should violence prevail," he posted. "I am relieved to learn that Donald Trump is now safe and wish him a speedy recovery. My condolences go out to the close ones of this attack's victim, a rally attendee. I extend my wishes for strength to everyone who is horrified by this event. I wish America emerges stronger from this."
Shooting ahead of Republican nomination
Mr Trump and Mr Biden are locked in a close election rematch, with most opinion polls including those by Reuters/Ipsos showing the two evenly matched.
The Biden campaign said it was pausing all messaging to supporters and working to pull down all of its television ads as quickly as possible, the campaign said.
Mr Trump is due to receive the Republican nomination formally at the Republican National Convention that kicks off in Milwaukee on Monday.
Mr Trump, who served as president from 2017-2021, easily bested his rivals for the Republican nomination early in the campaign and has largely unified around him the party that had briefly wavered in support after his supporters attacked the US Capitol on January 6, 2021, attempting to overturn his 2020 election defeat.
The businessman and former reality television star entered the year facing a raft of legal worries, including four separate criminal prosecutions.
He was found guilty in late May of trying to cover up hush money payments to a porn star, but the other three prosecutions he faces - including two for his attempts to overturn his defeat - have been ground to a halt by various factors including a Supreme Court decision early this month that found him to be partly immune to prosecution.
- with AP