Julia Gillard, who was unceremoniously dumped as the leader of the Australian Labor Party, resigning as prime minister the next day, says she was the target of “aggressive sexism” during three years in power.

Ms Gillard made the comments in her first interview since she was sacked from her party in June before the general election and replaced by the man she ousted three years earlier.

She was replaced by Kevin Rudd who led his party to a crushing election defeat on September 7. Mr Rudd beat Ms Gillard in a ballot of MPs by a margin of 57 to 45 to become Labor Party leader. The move was only the second time a sitting Australian prime minister had been removed from their first term in office by their party; Mr Rudd was the first.

Download the new Independent Premium app Sharing the full story, not just the headlines

Ms Gillard told an audience at the Sydney Opera House that she reacted with “murderous rage” to the sexist attacks on her in social media and elsewhere. She was called “witch” and “bitch” on protesters' banners.

“I was surprised by it. I had issues related to my gender before I became prime minister,” she said, mentioning an opposition senator condemning her as unfit to lead because of her decision not to have children.

“There was this underside of ... really violent, ugly sexism that came forward, and I think it finds easier expression because of the social media, but I think it would have been there anyway,” she said.

Mr Rudd’s deputy Anthony Albanese told Guardian Australia that gender and internal destabilisation had also played a part.

“There is no doubt that gender was part of it in my view. The prime minister was subjected to a range of political discourse that was deeply disturbing in its nature,” he said.

Ms Gillard recently revealed feelings of loss over her defeat can still hit her “like a fist”.

“Losing power is felt physically, emotionally, in waves of sensation, in moments of acute distress,” she wrote, adding that reflecting on memories from her time in office or even the kind words of family and colleagues can “bring forth … pain so strong you feel it in your guts, your nerve endings”.