Simon Walsh, a senior aide to the Mayor of London sacked as a result of allegations that he viewed an indecent photograph of an underage male insists he is innocent.

He told the Evening Standard he felt he had been trapped by new laws which make it a crime to open a picture of a naked male under the age of 18 on a computer. He told the paper he had not solicited the message. Although the age of consent is 16, pornographic models need to be over 18 to be filmed or photographed.

The openly gay barrister, 49, was charged on that count, and on a second relating to a picture of a man in a gas mask in April.

He said police alleged the image was indecent as the gas mask pose was “life-threatening”, due to a risk of suffocation. Mr Walsh contended that the image would be on sale legally in many sex shops.

Mr Walsh was removed from his position as mayoral appointee to the London Fire Authority this week. He said the Mayor of London, Boris Johnson, and his chief of staff Sir Edward Lister, took the decision after he would not stand down voluntarily.

But Mr Walsh insisted: “I have nothing to regret or be ashamed of. I have done absolutely nothing wrong.”

He said the police service themselves are not sure the male in the first picture was under 18.

Mr Walsh added: “I would have appreciated the opportunity to say to Boris what I’ve said [to the Standard]. He may have made exactly the same political decision but I’m not sure I would have felt quite as cross about it.

“The grounds of the letter of dismissal was that I hadn’t given them full information.

“If they think that when I’m arrested I’m going to give full information when I don’t know the precise nature of the allegations, they’re asking the impossible.”

The case should be committed to the Southwark Crown Court next week.