Labour leader Sir Keir Starmer has said he has confidence in a shadow Foreign Office minister who said he would be “quite happy” for Russia to be able to hack into the UK’s Trident nuclear missile system and render it useless.

Sir Keir gave his backing to Fabian Hamilton after the Mail on Sunday reported on a video clip from September 2019 in which the shadow minister made the remarks at a rally by the Campaign for Nuclear Disarmament.

The Labour leader also stressed that the opposition was “absolutely unshaken” in its support for Nato and Trident.

Asked by broadcasters about Mr Hamilton’s 2019 remarks, the Labour leader said: “Look, he made some comments a number of years ago. I have confidence in him but the Labour Party position is absolutely clear.

“I went to Brussels myself to see the secretary general to talk about Ukraine and to make clear our unshakeable commitment to Nato and of course to the deterrent that comes with being part of Nato.”

Sir Keir also said: “I have been very clear in relation to my position and the Labour Party position in favour of deterrence as a strong ally of Nato. We were there when the treaty was first signed and Nato was set up.

“Our support for Nato is absolutely unshaken. I don’t think I could have been clearer in the last few weeks about the Labour Party position on either Trident or Nato.”

The video from 2019 shows Mr Hamilton, then serving as both a shadow defence minister and shadow Foreign Office minister, speaking about whether Russia has the capability to hack into the UK’s independent nuclear deterrent.

Mr Hamilton said he did not know whether it was “true or not” that Russian hackers could render the nuclear deterrent “entirely useless” as had been suggested to him by an unnamed Labour colleague, but added he would be “quite happy” for Russia to do this, “as long as we could do the same to theirs”.

The Labour MP for Leeds North East was criticised by Defence Secretary Ben Wallace for his remarks, according to the Mail on Sunday, with the minister suggesting Mr Hamilton was “backing Britain’s enemies”.

During a visit to a nursery in north west London, Sir Keir also stressed the UK needed a proper energy strategy from the Government rather than going “cap in hand” to dictators.

During the visit, in which the Labour leader met with parents to ask them about the rising cost of living, he said: “We don’t need energy rationing. We do need an energy strategy. And going from one dictator in Russia for your oil and gas, cap in hand to another dictator in Saudi Arabia is not an energy strategy.

“We need a strategy that is fast-forwarding on renewables and on nuclear, retrofitting so that we can actually keep our houses and our homes warmer.

“That is the strategy, the security strategy, that we need for this country and we don’t have it from this Government.”