The government is to fix an 'anomaly' that allows some, but not all, prisoners released into the community to vote,  justice secretary David Lidington announced today - ending days of speculation about the government's plans to escape a legal quagmire.

At present, convicted offenders who are released on licence with an electronic tag can vote. Those on temporary licence, however, cannot.

Lidington said today that release on a temporary licence is a tool allowing offenders to commute to employment and prepare themselves to return to society. 'Reinstating the civic right of voting at this point is consistent with this approach. It is absolutely not an automatic entitlement and is subject to rigorous risk assessment,' he said.

The ministry estimates that the change to prison service guidance will affect up to 100 offenders at any one time, and none will be able to vote from prison.

The administrative measure is part of the government's attempt to address points raised in a 2005 European Court of Human Rights judgment.

In Hirst (No 2) v the United Kingdom, the applicant, who was sentenced to life imprisonment for manslaughter, was disenfranchised during his period of detention by section 3 of the Representation of the People Act 1983 which applied to those convicted and serving a custodial sentence. In 2004 the applicant was released on licence. He alleged that, as a convicted prisoner in detention, he had been subject to a blanket ban on voting.

The court held that article 3 (right to free elections) of protocol number one to the European Convention on Human Rights had been violated on account of the 'automatic and discriminate restriction' of the applicant's right to vote.

The government will hope that today's announcement puts a lid on what has been a simmering issue. In 2011, MPs by a majority of 234 to 22, voted to continue the ban in defiance of the Strasbourg ruling. In December 2013 a joint committee recommended allowing prisoners serving sentences of 12 months or less to vote. However, no legislation was forthcoming.

Lidington said today that the government will make clear to criminals when they are sentenced 'that while they are in prison this means they will lose the right to vote. This directly addresses a specific concern of the Hirst judgment that there was not sufficient clarity in confirming to offenders that they cannot vote in prison'.

He concluded: 'We believe these changes address the points raised in the 2005 judgment in a way that respects the clear direction of successive parliaments and the strong views of the British public on prisoner voting.'