Thomas Matthew Crooks
A demonstrator holds a sign of Thomas Matthew Crooks outside of a security zone checkpoint by the Fiserv Forum during the the RNC. Jim Vondruska/Getty Images

The gunman who attempted to assassinate Donald Trump at a rally in Butler, Pennsylvania had researched events for both Trump and President Joe Biden and simply picked Trump because it was a "target of opportunity" according to a report.

Thomas Crooks opened fire at Trump, nicking his ear but killing another person who was attending the election rally.

Crooks had searched online in a detailed effort to plan an attack on some event and "he looked at any number of events or targets," Kevin Rojek, the special agent in charge of the FBI's Pittsburgh field office said, according to the Associated Press.

He said that Crooks became "hyper-focused" on the Butler rally after it was announced.

His online searches included: "Where will Trump speak from at Butler Farm Show?" "Butler Farm Show podium" and "Butler Farm Show photos."

Investigators say Crooks had shown an interest in explosives, major events and politicians but they don't have a clear motive about why he wanted to kill.

Crooks shot from the roof of a nearby building during the rally. He was killed by a sharpshooter.

The Secret Service has come under blistering scrutiny over its preparations for the event. Several agents were put on leave as part of the ongoing investigation into the incident.

The Secret Service director resigned after members of a bipartisan Congressional committee said she should be immediately fired.