Harriet Harman has suggested Gordon Brown sidelined her as prime minister because she was a woman.

The Shadow Culture ­Secretary last night linked the former prime minister's decision not to make her deputy prime minister to her gender and recounted how she was relegated to a dinner for leaders' wives at a major summit.

Ms Harman was elected as the party's deputy leader in 2007, the same year Mr Brown entered No 10.

Loading article content

Ms Harman said: ­"Imagine my surprise when, having won a hard-fought election to succeed John Prescott as deputy leader of the Labour Party, I discovered I was not to succeed him as Deputy Prime Minister.

"If one of the men had won the deputy leadership would that have happened? Would they have put up with it? I doubt it. And imagine the consternation in my office when we discovered that my involvement in the London G20 summit was inclusion at the No 10 dinner for the G20 leaders' wives."

She recalled former ­cabinet colleague Caroline Flint's denunciation of women being used as "window dressing'."

Ms Harman also claimed she had been urged to fit in by being "clubbable" in the bars of Westminster but her refusal to toe the line led to a "nasty" response, including from her own colleagues, who briefed the papers when she suffered mastitis.

On Twitter, Mr Brown's former spin doctor Damian McBride described her comments as "utter bilge". He added: "As every man and woman who ever worked for him could attest, Gordon judged people on only one thing: were they useless or not."

Ms Harman responded by pointing out Mr McBride was sacked for "denigrating women and he is doing it again".