Shah, who was elected MP for Bradford West last May, shared a picture of Israel’s outline superimposed on to a map of the US under the headline “Solution for Israel-Palestine Conflict – Relocate Israel into United States”, with the comment “problem solved”.

In the post shared in 2014 – nine months before Shah became an MP – it went on to say that Americans would “welcome Israelis with open arms” and that the relocation would bring peace to the Middle East by ending “foreign interference”.

The post suggested the US had “plenty of land” to accommodate Israel as a 51st state, allowing Palestinians to “get their life and their land back”.

Alongside the post, Shah added a smiley-face emoji and suggested she would lobby the prime minister to adopt the plan.

It added that Israeli people would be welcome and safe in the US, while the “transportation cost” would be less than three years’ worth of Washington’s support for Israeli defence spending.

Shah added a note suggesting the plan might “save them some pocket money”.

After the posting was highlighted by the Guido Fawkes website, Shah released a statement in which she said: “This post from two years ago was made before I was an MP, does not reflect my views and I apologise for any offence it has caused.”

Shah is a member of the House of Commons home affairs select committee, which is conducting an inquiry into the rise of antisemitism.

In a statement released by the Labour party, she confirmed her resignation as McDonnell’s PPS. She said: “I deeply regret the hurt I have caused by comments made on social media before I was elected as an MP.

“I made these posts at the height of the Gaza conflict in 2014, when emotions were running high around the Middle East conflict. But that is no excuse for the offence I have given, for which I unreservedly apologise.

“In recognition of that offence I have stepped down from my role as PPS to the shadow chancellor John McDonnell. I will be seeking to expand my existing engagement and dialogue with Jewish community organisations, and will be stepping up my efforts to combat all forms of racism, including antisemitism.”

Jonathan Sacerdoti, director of communications at the Campaign Against Antisemitism, said it would be hard for his organisation to take the parliamentary committee’s inquiry into the rise of antisemitism seriously if Shah remained part of it.

“Once again the Labour party has been revealed to have within its ranks people who express extreme prejudice towards Jewish people in their public statements. Once again the party has failed to find these statements itself, and reject those who freely and willingly express them.

“How can we believe Labour when it says it takes the problem of Jew-hatred seriously when it repeatedly defends antisemitic MPs? It seems that Jeremy Corbyn’s anti-racism policy only operates when convenient.”

Sacerdoti added: “We have offered to assist the select committee in its work investigating antisemitism. However, if Naz Shah remains on the committee it will be hard for those of us giving evidence to take the inquiry seriously.”

Earlier this month Shah criticised Abdul Zaman, the deputy chairman of Bradford’s Conservative Association, after he allegedly gave a speech “endorsing misogyny and antisemitism.”

Shah was instrumental in forcing the association to suspend Zaman after he was accused of speaking passionately about “clan politics” during a speech to start Tory candidate Sajid Akhtar’s campaign for election to Bradford council. Shah wrote to David Cameron complaining about Zaman’s speech.

But Barry Whitaker, chairman of the Bradford Conservative Association, said at the time that Zaman had said nothing wrong but confirmed that the party had suspended him while an investigation was carried out.

Now councillor Simon Cooke, leader of the Conservative group on Bradford council, has written to Labour party leader Jeremy Corbyn demanding Shah’s resignation.

He said: “She should be treated in the same way that Abdul Zaman was and it will be interesting to see Labour’s response to this.

“I have been very disappointed with her comments and it is deeply concerning that she made them just months before being elected.”