It said Hodges informed a “stakeholder” of Abbott’s attendance at an Australia Day function with Gillard, and the information was subsequently passed on to Aboriginal activists.

“During that discussion, the staff member did not in any way suggest or encourage violence or demonstration,” a spokesman for Gillard said.

“Nevertheless, given the circumstances of yesterday’s [Thursday’s] function at the Lobby Restaurant, this action was an error of judgment. As such, the staff member’s resignation has been accepted,” he added.

Activists were furious with Abbott after wrongly believing he had called for a protest camp to be disbanded. They rushed a nearby restaurant upon hearing Abbott was inside.

The statement from Gillard’s office did not address the allegation that Hodges sought to inform activists of Abbott’s alleged comments.

Hodges was a well-regarded member of Gillard’s staff who had also worked for former prime minister Kevin Rudd.

Gillard and Abbott were confronted by about 100 activists as they attended the ceremony at the restaurant near Parliament House in Canberra on Australia Day, which celebrates the nation’s foundation.

The two most powerful figures in Australian politics were effectively trapped in the building for about 20 minutes as demonstrators from a nearby longterm protest camp banged on windows, chanting “shame” and “racist.”