Greens branch members attempted to overturn Sarah Hanson-Young’s preselection to the Senate after learning she was pregnant, the South Australian senator says, in a speech detailing her decade-long battle against sexism in politics.

In a speech to be delivered to the Women in Leadership summit in Adelaide on Wednesday, Hanson-Young, who was the youngest person ever elected to an Australian parliament, said her entry into politics in 2007 came with a rude awakening when she simultaneously discovered she was pregnant.

In what she now says may be a case of “youthful naivety”, Hanson-Young did not consider her pregnancy to be an issue after being preselected by Australia’s most progressive political party.

“Unfortunately, this was not the case,” she says in her speech.

“From the moment I started telling people I was expecting, the grumbles started. ‘You really should have told people you wanted to have a baby before you contested the preselection’, one male member of the party said to me.

“My joy as an expecting mother quickly turned to disappointment when a group inside one of the local branches tried to have my preselection ruled invalid on the basis I was now pregnant. They argued that members had not been given all the relevant information before voting on the ballot.”

Hanson-Young said she never considered revealing to preselectors she had skipped a period, or had a medical disorder that impacted her fertility, as they were “questions a male candidate would never have been asked and information he would never be expected to divulge”.

“Thankfully, reason prevailed and the campaign against me was quietly dropped,” she said, but she said it was a harbinger of things to come.

“For years I’ve winced and tried not to flinch at sly comments from male colleagues about my dress, my apparent sex life,” she says.

“What started as mutterings while I was speaking, or during a debate, over the years have become slurs that are shouted across the chamber floor.

“I’ve spent years steeling myself against abuse. I learned not to show any emotion when some members of parliament would taunt me with names of men they imply I’ve had sex with. These slurs and accusations are used to bully, intimidate and stop me from doing my job. Weaponised words and rumours were used to throw me off my game.”

Hanson-Young said she was called the “Green Kardashian” as she went to greet members of the Afghan embassy in the chamber, “managing to humiliate me and raise the spectre of one of the world’s most slut-shamed families”.

It culminated in her exchange with David Leyonhjelm in the chamber, and later comments the NSW senator made in the media subsequent to the exchange, which are now the subject of defamation proceedings. Leyonhjelm has denied any wrongdoing.

“I’d had enough of being silent,” Hanson-Young says in her speech.

“I wanted it to stop and the only option I had now was to start calling it out and to name the shamers. So that’s what I did and that’s what I’ll keep doing.”

The plight of women in Australia’s federal parliament has been raised repeatedly this year, with the Liberal party forced to acknowledge issues with recruiting women to its ranks, and how those who make it are treated and promoted, following allegations of bullying and intimidation in the most recent leadership spill and preselections.

Women make up just 33% of the 225-seat parliament, and just 24% of the ministry. Women claim only six of 23 cabinet positions.

“The situation for women of colour is even bleaker,” Hanson-Young says. “Our federal parliament is a very white place.”

But after a decade in the Senate, Hanson-Young says she still has hope for the future for women in parliament, despite some of her own experiences.

“Change is possible, the arc of the universe can be bent, women can be heard and respected and hold power, but it is going to take more of us working to together to bring about that future,” she says.

“Like women all around the world, we know here that now is not the time for despair – it’s time to dig in and make change.”