A key plank of former Scottish secretary Alistair Carmichael's defence against allegations that he lied about leaking a memo smearing SNP leader Nicola Sturgeon has been dismissed by judges.

They ruled a law designed to prevent lies about other candidates can encompass a false statement about himself.

Mr Carmichael, who was re-elected Liberal Democrat MP for Orkney and Shetland in May, is the subject of a court bid to oust him after he denied but then subsequently admitted allowing the leak of a confidential memo in the run-up to the general election.

The memo claimed the First Minister wanted David Cameron to remain in Downing Street.

The MP initially denied having prior knowledge of the leak, which emerged around a month before voters went to the polls, but a Cabinet Office inquiry found it was leaked by his special adviser Euan Roddin with his approval.

The Election Court challenge was raised by four constituents who argued his actions called into question his integrity as well as his suitability to represent the constituency, and called for his election to be declared void.

Section 106 of the Representation of the People Act 1983 states "a person who... before or during an election, for the purpose of affecting the return of any candidate at the election, makes or publishes any false statement of fact in relation to the candidate's personal character or conduct shall be guilty of an illegal practice".

Mr Carmichael's counsel Roddy Dunlop QC insisted this should not include "self-talking", in this case making a false statement about knowledge or otherwise of a leaked memo.

However, judges Lady Paton and Lord Matthews have concluded the law can apply to "self-talking" as well as attacking another candidate.

An opinion of the court states: "In our opinion, the language used in Section 106 is wide enough to encompass a statement made by a candidate about himself.

"In our opinion the section applies to each and every candidate in the election.

"Thus if any person... were to make a false statement of fact in relation to the personal character or conduct of any of the candidates, then Section 106 would be engaged.

"On a proper construction of Section 106 we see no reason why the 'person' making the false statement about one of the candidates cannot be that candidate himself."

The court will now seek further evidence on two other points of law: whether Mr Carmichael's statement amounted to "false statements of fact" about his own personal character or conduct and whether they were uttered for "the purpose of affecting the return of any candidate at the election".

The interim judgement concludes: "We wish to hear evidence in relation to issues two and three before giving a determination and reporting to the House of Commons."

The constituents who took Mr Carmichael to court can now lodge a motion for the MP and Mr Roddin to appear as witnesses at the next hearing if they wish.

During the initial hearing on September 7, Mr Dunlop insisted there are no provisions in the Act to incriminate "self-talking".

He said: "If my learned friend (counsel for the petitioners) is right then this court might expect to get a lot busier.

"I ask the court to pause and consider the precedent that they are being asked to set... that henceforth any prospective MP will in the run up to an election effectively be strapped to a lie detector and administered a truth serum.

"That is because any untruth, no matter how public the subject, would engage Section 106.

"You might say: 'What's wrong with that, what's wrong with expecting honesty from our politicians?'

"The answer is that for 120 years it has been thought appropriate by parliament to distinguish between the public or political on the one hand and the private on the other."

However, in its opinion released today, the judges stated: "Even bearing in mind the serious consequences of an offence in terms of Section 106, it is our opinion that Section 106 is engaged when a candidate is talking about himself; and Section 106 is engaged if the statement is made for the purpose of 'affecting' the return of that candidate, whether the statement can be regarded as attacking and vilifying or as praising and laudatory.

"We see no reason to adopt a more narrow or restrictive construction of the clear language of the 1983 Act.

"As for the lack of precedent, it is our view that the issues which arise in this case have simply not arisen in previous cases.

"We therefore answer the first question - is Section 106 of the 1983 Act engaged by "self-talking" as opposed to attacking another? - in the affirmative."