An independent panel called on Thursday for a sweeping shake-up of the US Secret Service following its “historic” failure to prevent the July assassination attempt on former president Donald Trump.

“The Secret Service has become bureaucratic, complacent, and static,” the four members of the bipartisan review panel said in a letter to Homeland Security Secretary Alejandro Mayorkas that accompanied their 52-page report.

“The Secret Service as an agency requires fundamental reform to carry out its mission,” they said, and needs to urgently address “systemic issues.”

Trump was grazed in his right ear when a 20-year-old gunman opened fire from a nearby rooftop while the Republican presidential candidate was holding a campaign rally on July 13 in Butler, Pennsylvania.

One person in the audience was killed and the gunman, Thomas Crooks, was shot dead by a Secret Service sniper.

Much of the report was devoted to identifying the specific security failures that allowed the assassination attempt in Butler, many of which have already been publicly acknowledged by the Secret Service.

“July 13 represents a historic security failure by the Secret Service,” the report said, and a lack of “critical thinking” by current Secret Service agents was partly responsible.

The review panel said a new leadership team with “significant experience outside the Secret Service” was needed in the wake of the assassination attempt.

It also recommended that the agency abandon its responsibility for investigating financial crimes and re-focus on its core mission of providing protection to high-profile officials.

Secret Service director Kimberly Cheatle resigned following the assassination attempt and was replaced by acting director Ronald Rowe.

Rowe said Thursday that the Secret Service will “carefully examine the report and recommendations.”

“However, we are not waiting to act,” he said in a statement. “We have already significantly improved our readiness, operational and organizational communications and implemented enhanced protective operations for the former president and other protectees.”

The review panel did not address a thwarted assassination attempt on Trump that took place at one of his golf courses in Florida in September.