The former president ducked to the floor as shots rang out and was mobbed by Secret Service agents, while the sniper, who was killed by the secret service, has been named as Thomas Matthew Crooks.
Donald Trump has been shot and injured in an assassination attempt at a campaign rally, which saw a spectator and the gunman killed.
The former president escaped with a bullet wound to his ear in the attack, which happened early on Saturday evening as the former president was giving a speech to supporters in Butler, Pennsylvania.
Mr Trump was seen ducking to the ground clutching his ear as a series of shots rang out and people screamed in panic.
He was mobbed by Secret Service seeking to shield him and as he was bundled off stage with a bloodied ear Mr Trump pumped his fist in the air in a show of defiance and shouted "fight" as the cheering audience chanted "USA".
As well as one person in the crowd being killed, two people were critically injured after the gunman fired "multiple shots" from an "elevated position", said the Secret Service.
The FBI has named the attacker shot dead by security forces as 20-year-old Thomas Matthew Crooks, who according to state records was a registered Republican.
Footage at the scene showed a white-roofed building, about 150m from where Mr Trump was speaking, with a body and a rifle on top.
- Letter from America: Is former president Donald Trump a hero or villain?
- Chidzivo, Tarakinyu clinch Kabag honours
- Letter from America: Is former president Donald Trump a hero or villain?
- Building narratives: Destiny Through Purpose: A book for dreamers
Keep Reading
Writing on his Truth Social platform, Mr Trump said he was "shot with a bullet that pierced the upper part of my right ear".
He said: "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 on social media.
"Much bleeding took place, so I realised then what was happening.
He added: "I want to thank The United States Secret Service, and all of law enforcement, for their rapid response."
Extending condolences to the families of the other casualties, he said: "It is incredible that such an act can take place in our country."
His campaign spokesman Steven Cheung said Mr Trump was "fine" and been checked out at a local medical facility while the former president's eldest son Donald Trump Jr said his father "is in great spirits".
Following the attempt on his life, Mr Trump flew back to New Jersey where he was pictured giving a brief wave as he left his plane.
President Joe Biden,who has spoken to his White House rival, condemned the shooting and said there was "no place in America for this kind of violence".
In an address to the nation he said: "It's sick. Sick.
"We cannot allow for this to be happening."
The Biden campaign said it was pausing all messaging to supporters and moving to pull all of its television ads as quickly as possible.
Mr Trump's campaign and the Republican National Committee said the party's convention in Milwaukee, which is due to start on Monday, will "proceed" after the shooting.
Former president Barack Obama wrote on X: "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."
His predecessor George W Bush described the shooting as a "cowardly attack" on Mr Trump's life.
UK Prime Minister Sir Keir Starmer said on X: "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."
Israel's president, Benjamin Netanyahu, posted: "Sara and I were shocked by the apparent attack on President Trump. We pray for his safety and speedy recovery."