MPs have raised concerns that Boris Johnson is undermining press freedom after certain reporters were banned by his top media adviser from attending a government briefing on the EU.

A series of Labour, SNP, Lib Dem and some Tory MPs raised concerns about the events of Monday afternoon in 10 Downing Street, when selected journalists were invited to a briefing and others were excluded.

It prompted a walkout by all the senior journalists invited to the briefing, including the BBC’s Laura Kuenssberg, ITV’s Robert Peston, and reporters from Sky, the Telegraph, Sun, Mail, Guardian and Financial Times.

The incident was debated in the House of Commons, after Tracy Brabin, the shadow culture secretary, was granted an urgent question. Chloe Smith, a Cabinet Office minister, defended the briefing as a normal way of informing some journalists about specialist technical subjects, in addition to routine lobby briefings to be held twice daily.

Sir Peter Bottomley, the Conservative father of the House of Commons, advised ministers that there was a “problem” which needed resolving with the media, although he said the behaviour of New Labour spin doctors was worse.

“I do believe that it would be sensible for the government to consider having a talk to the senior political editors who did walk out and see if there’s a way of getting over this problem and resolving it,” he said.

Bim Afolami, another Tory MP, asked the minister to ensure “briefings are done in a sensible way with the agreement of all members of the lobby over the longer term” and that the Commons should be committed to “no political interference in the media as that is a foundation of our democracy”.

Opposition MPs were even more critical. Brabin said: “The ability of the lobby to have access to briefings without favour is a longstanding tradition and one that is vital to the health of a functioning democracy … What was the selection criteria and if that decision was made by a special adviser, are they in violation of the code of conduct of special advisers and the civil service code?

“The government’s behaviour in these matters threatens the civil service’s core values of impartiality and objectivity. It also brings into question the integrity of future government-media briefings and the conduct of its special advisers and damages a free and vibrant press.”

Pete Wishart, an SNP MP said the minister’s attempts to defend the selective briefing were “woeful and desperate” and “would make Comical Ali look like a Pulitzer prize winner”, calling it a “black day for press freedom”.

The government’s actions have been condemned by the Society of Editors and the National Union of Journalists.

Keir Starmer, the Labour leadership candidate, has also written to Mark Sedwill, the head of the civil service, asking him to urgently investigate what happened and whether government officials are being politicised.

He warned that the decision to exclude some of the media from a briefing with David Frost, the government’s chief trade negotiator, had “undermined the civil service’s ability to comply with its core values of integrity, objectivity and impartiality”.

Frost is a former senior civil servant who was made a political special adviser under Johnson but a previous briefing on security was conducted by intelligence and security officials bound by the civil service code.

“The actions of the prime minister’s director of communications, who is a political appointee, are deeply disturbing,” Starmer said. “I am concerned that they have undermined the civil service’s ability to comply with its core values of integrity, objectivity and impartiality. Equally, banning sections of the media from attending important briefings about important matters of government is damaging to democracy.

“For instance, the government’s post-Brexit trade plans are matters of national importance. The media’s access to the prime minister’s chief negotiator should not be determined by political favouritism.”

Earlier, Michael Gove, a senior cabinet minister, refused to comment on the decision or say what he as a former journalist would have done in the same situation.

He told Sky News that he did not know the full circumstances but he was sure the dispute could be sorted out.