MP Emily Thornberry of London expressed her regret and astonishment at not being named to a key ministerial position in the next Labour Government.
During Labour's opposition, Ms. Thornberry held the position of shadow attorney general. She was among the select few members of Labour's leadership not to be appointed to a comparable position in the government after the general election.
Instead, barrister Richard Hermer KC was chosen for the brief, which is not a Cabinet role, although he will attend Cabinet meetings.
Mr Hermer will be ennobled, sitting in the House of Lords to fulfil his Government duties
In a statement shared on X, formerly Twitter, three days after the new Attorney General was appointed, Ms Thornberry shared her disappointment.
She spoke of her record of “eight-and-a-half unbroken years in the shadow cabinet, a longer record of service than anyone else in that time”, and listed her work setting out Labour’s policies on tackling fraud and supporting sexual harassment whistleblowers among her achievements.
Ms Thornberry, MP for Islington South and Finsbury, added: “I am very sorry and surprised not to be able to continue that work in Government, but I wish all my brilliant colleagues well, and I know that Richard Hermer KC – a much more accomplished lawyer than I could ever hope to be – will do an outstanding job as Attorney General.
“Nothing in the personal disappointment I feel can detract from the amazing and historic victory that all of us in the Labour movement worked together to win last week, and the chance that we now have to change our country for the better.
“I will continue giving my unstinting loyalty to our Prime Minister, Keir Starmer, as he leads that work, as I have done since he became leader, and I look forward to supporting his Government in every way I can in the years to come.”
Ms Thornberry was one of the 36 MPs who nominated Jeremy Corbyn in the 2015 party leadership race.
She went on to serve in several senior opposition roles when the now-independent MP for Islington North led the Labour Party, including as his effective second-in-command.
Ms Thornberry caused a stir during the election campaign when she said that class sizes in state schools may increase as a result of Labour plans to charge VAT on private schools.
Sir Keir insisted that Ms Thornberry has a "big part to play" in Labour after she said she was "surprised" not to be given a ministerial job.
Speaking to reporters in Wales, the Prime Minister said: "I'm putting together a very strong team based on delivering.
"We got a very strong mandate at the general election, a mandate for change, a mandate for doing politics differently, and about service. That's why I'm putting my team together.
"Emily Thornberry has been fantastic, she's got a big part to play, as has every single one of my now 412 Labour MPs.
"But it's very important that we demonstrate the progress we're making, which is why I've been to Scotland, to Northern Ireland, and now to Wales to reset the relations."