Former US president Donald Trump has called for unity and resilience after an attempt on his life injected fresh uncertainty into a tumultuous American presidential campaign.

Following the attack in Butler, Pennsylvania, President Joe Biden implored Americans to “cool it down” in the final stretch of the election and “resolve our differences at the ballot box”.

The opponents’ statements followed a shooting that shook the firmament of the American political system, causing a temporary detente in a heated presidential campaign expected to resume in earnest at the upcoming Republican National Convention in Milwaukee, Wisconsin.

A full day after the shooting, the motive of the gunman – named by the FBI as 20-year-old Thomas Matthew Crooks – remains a mystery, with investigators saying they believe he acted alone before he was fatally shot by US Secret Service agents.

Mr Biden ordered an independent security review of the attack, which killed a bystander, critically injured two others and prompted questions about how a gunman was able to open fire from a rooftop near a Pennsylvania campaign rally.

Trump supporters in California
People have rallied in support of Republican presidential candidate Donald Trump (AP)

The FBI was investigating the shooting as a potential act of domestic terrorism.

Mr Trump, the presumptive Republican presidential nominee, said the upper part of his right ear was pierced by a bullet.

His aides said he was in “great spirits” and doing well.

The former US leader arrived in Milwaukee on Sunday evening for the convention, which begins on Monday.

Mr Trump told the Washington Examiner that he had rewritten his speech for the event to focus more on national unity than on the policies of Mr Biden.

A school photo of the gunman
Thomas Matthew Crooks was identified by the FBI as the gunman i(Bethel Park School District via AP)

In a post on his social media site, Mr Trump said: “In this moment, it is more important than ever that we stand United, and show our True Character as Americans, remaining Strong and Determined, and not allowing Evil to Win.”

In a prime-time address, Mr Biden urged the public to recommit to civil debate.

“There is no place in America for this kind of violence – for any violence. Ever. Period. No exception,” he said. “We can’t allow this violence to be normalised.”

On Saturday night, Mr Trump spoke briefly with Mr Biden, whose Sunday night speech marked his third time addressing the shooting.

The rallygoer who was killed was named as Corey Comperatore, a former fire chief from the area, according to Pennsylvania governor Josh Shapiro, who said Mr Comperatore “died a hero.”

“His wife shared with me that he dove on his family to protect them,” Nr Shapiro said. The two injured bystanders were listed in stable condition.

The FBI identified the gunman as Thomas Matthew Crooks, 20, of Bethel Park, Pennsylvania, about 50 miles from the scene of the shooting.

The gunman had his father’s AR-style rifle and was perched atop a nearby roof when some rallygoers pointed him out to local law enforcement, according to two law enforcement officials.

A local law enforcement officer climbed to the roof and found Crooks, who pointed the rifle at the officer.

The officer retreated down the ladder, and the gunman quickly fired towards Mr Trump, the officials said. That is when US Secret Service officers shot him dead.

Donald Trump raises his fist in the aftermath of the shooting
Mr Trump called for unity after the attempt on his life (AP)

Questions abounded about how the gunman got so close in the first place. Kevin Rojek, the agent in charge of the FBI’s Pittsburgh field office, said “it is surprising” the gunman was able to open fire on the stage before the Secret Service killed him.

Bomb-making materials were found inside both Crooks’ vehicle and at his home, officials said. The FBI described the devices as “rudimentary”.

His motive remained unclear. Crooks was not on the FBI’s radar, and he was believed to have acted alone. Investigators combed through his social media accounts but found no immediate threatening writing or posts, or communications indicating an ideological motive. His family is understood to be co-operating.

Crooks’ political leanings were also unclear. Records show him registered as a Republican voter in Pennsylvania, but federal campaign finance reports also show he gave 15 dollars to a progressive political action committee on January 20 2021, the day Mr Biden was sworn in.

A banner of Donald Trump hangs over a Highway 24 overpass in Lafayette,
The shooting has sparked an inquiry into the gunman’s motive, as well as how he was able to fire shots (Minh Connors/San Francisco Chronicle via AP)

The absence of a clear ideological motive added to deepening questions about the shooting.

Mr Biden urged Americans to stay patient. “Please, don’t make assumptions about his motives or his affiliations,” he said.

The President has also ordered a security review of operations for the Republican National Convention, which is proceeding as planned.

The US Secret Service said it was “confident” in the security plan, and no additional changes were planned.

Republican representative Mike Kelly, who represents the area where the shooting occurred, attended with his wife and grandchildren and was just behind Trump when he was wounded. Kelly said he was “in a state of bewilderment of how and what has happened to the United States of America.”

“I just wish people — tone it down,” he said. “Quit trying to find, to blame somebody. The blame lies somewhere in the psyche of America.”