The defence secretary has accused three opposition MPs of disrespecting the armed forces by getting drunk on a trip to visit soldiers in Gibraltar.

Ben Wallace is to write to Labour and the Scottish National party over the conduct of their MPs, which, he said, “put military personnel in a difficult position”.

The three were among 15 MPs on a three-day trip to visit troops in Gibraltar over Armistice Day this week, as part of a regular scheme to give politicians an insight into the work of the armed forces.

A witness said the trio had been drinking in an airport departure lounge, then continued to drink heavily once in the air. It was claimed military personnel had to intervene when the two SNP MPs involved were rude to airport staff after encountering problems with their Covid passes.

Those MPs – Drew Hendry and David Linden – continued to a welcome dinner for the visiting party, but the Labour MP, Charlotte Nichols, was taken to a hotel and flew home the following day, reports claimed. She is understood to be on medication that may affect her reaction to alcohol.

On Thursday night, the SNP hit back after further reports claiming two Conservative MPs on the trip were out drinking late into the night and were hungover the following day.

A party spokesperson called on the defence secretary to apologise for what he claimed was a “botched” attempt to divert attention from the “sleaze” allegations engulfing the Tories at Westminster.

A Conservative source did not deny that the party’s MPs, Ben Everitt and Christian Wakeford, had been out for a drink but rejected claims they had turned up with hangovers for events the following day.

A party source said that it was a “desperate attempt” to deflect attention from the behaviour of the opposition members on the flight. They said it was “absurd” to equate MPs going for a drink outside the hours of the visit to the alleged conduct of the opposition MPs. The source said neither Everitt nor Wakeford was hungover and that they had fully participated in the visit the next day.

Earlier, the Telegraph had quoted Wallace commenting on the opposition MPs’ alleged behaviour on the flight, saying: “[It] shows a lack of respect for the enduring work of our armed forces. The armed forces scheme is an opportunity for both parliamentarians and the military to understand each other. This behaviour puts military personnel in a difficult position and risks undermining respect for parliament.”

The Ministry of Defence refused to comment on the claims, instead directing the Guardian to the parties involved and to the Armed Forces Parliamentary Scheme, which organised the trip.

The SNP rejected Wallace’s accusation. “These suggestions are false,” a party spokesperson said. “Drew Hendry and David Linden were honoured to be invited to this important event and attended all engagements, including the welcome meeting and dinner shortly after landing.

“Instead of trying to divert attention from the Tory corruption scandal engulfing Westminster, Ben Wallace should be apologising for his role in it, including voting to get Owen Paterson off the hook.”

Nicola Sturgeon, the Scottish first minister and SNP leader, said: “I know Drew and David well. They say these allegations are unfounded and that is something I’ve got confidence in.”

The Guardian has approached Labour for comment.