The British government pulled the plug Friday on a planned address by President Trump to the joint Houses of Parliament during a state visit – a decision that followed a kerfuffle between two house speakers.

Commons Speaker John Bercow this week said Trump should not be allowed to address Parliament because of his immigration ban as well as the UK’s “opposition to racism and to sexism.”

Some Parliament members applauded his remarks, while others called on him to step down.

He also was assailed by his House of Lords counterpart, whose feathers were ruffled when Bercow failed to consult him before calling for the boycott Monday, the Express reported.

Both men have veto power over proposals for visiting leaders to address Parliament.

“[John Bercow] contacted me this morning, he told me that while he maintained his view on the issue, he was genuinely sorry for failing to contact me,” Lord Fowler said Tuesday after calling for Bercow to be stripped of his veto power.

Trump’s controversial visit is expected to take place in late summer or early autumn — with officials trying to avoid a formal snub by making sure he is not in London when Parliament is sitting, The Guardian reported.

Westminster sources told the paper that a weekend visit at the very end of August or in September is being discussed among the government, Buckingham Palace and the White House.

Parliament will be in summer recess until Sept. 5 and adjourns again for party conferences 10 days later for nearly a month.

Bercow said he would not give his approval either to a speech by Trump in Westminster Hall or in the royal gallery, both of which have traditionally been used for addresses by visiting dignitaries.

Officials also are said to be eager to limit Trump’s public exposure in general during his visit to minimize the opportunities for protests and mayhem.

Another thorny issue that has yet to be resolved is how much the Queen and the Duke of Edinburgh will be involved in a visit of which she is officially the host.

The royal couple usually spend late August and September at Balmoral in Aberdeenshire and only rarely return to London during their stay.

One possibility is for Trump to be invited to a state banquet at Windsor Castle, rather than at Buckingham Palace – making it easier to guard against protesters while satisfying the diplomatic protocols.

Trump also might be encouraged to spend more time in Scotland, where he could visit the Queen at Balmoral Castle. Such an arrangement would enable him to visit the Isle of Lewis, where his mother, Mary MacLeod, was born in 1912.

But a visit to Scotland also would raise delicate political issues for the nationalist government led by Nicola Sturgeon, which would have to decide whether to boycott Trump or not.

Two of Trump’s modern presidential predecessors — Ronald Reagan and Bill Clinton — have addressed the joint houses in the royal gallery. Only Barack Obama, in 2011, has made a speech in the 11th-century Westminster Hall.