Emergency terrorism laws announced after the Streatham attack could be pushed through parliament by 27 February – just one day before a convicted terrorist who disseminated Islamic State propaganda via Twitter is due for automatic release.

Mohammed Zahir Khan, a shopkeeper from Sunderland, was sentenced to four years and six months in May 2018 for nine counts of sharing Islamist material and calling for “death to shia” Muslims.

Investigators say he is due for automatic release on 28 February – at the mid-point of his sentence, allowing for time spend on remand – unless the government successfully changes the law to make the minimum time served two-thirds of the sentence levied at court.

Khan initially denied the postings were his, but once police and prosecutors had demonstrated he was the author, he switched his plea to guilty, but said that he had been reckless and not set out to encourage terrorism, according to a summary of the case from the Crown Prosecution Service.

Some of his tweets were in support of Isis. “Welcome to the year of fear, IS will make this one the deadliest ever. Mr Kuffar [non-believers] prepare for real war,” he wrote in January 2017. Another said “death to shias … death to every single one of them”.

Facebook Twitter Pinterest Mohammed Zahir Khan was jailed in May 2018 for sharing Islamist material. Photograph: Counter Terrorism Policing North East

After a trial in May 2018, Khan, then aged 40, was found guilty of terrorist offences and encouraging religious hatred, and was sentenced at Newcastle Crown Court. At the time police said: “Khan openly disseminated material over the internet that promoted terrorism and hatred of others.”

The emergency legislation comes following a terrorist attack in Streatham, south London on Sunday. Sudesh Amman, 20, was killed by police after he stabbed two people just days after being automatically released from prison for charges of disseminating terrorist material.

A Whitehall official said the legislation would be introduced in the Commons on 11 February.

As the government now has a stable majority, the legislation should pass all its stages in the Commons before MPs break for recess next Thursday. It will begin its passage through the House of Lords on 25 February and the government hopes to get royal assent two days later.

The official said: “There are no terrorist offenders who are due to receive automatic release before that date.

“If the legislation is passed by 27 February we can prevent the automatic release of any further terrorist suspects who might pose a threat to the public. This is emergency legislation which we believe is vital for protecting the public and we are sure the Lords will wish to carry out its scrutiny quickly.”

They added: “We cannot continue to be in a position where the state has no power to block the release of terrorists who continue to pose a threat to the public.”

Play Video Government says terror offenders must serve at least two-thirds of sentence – video

As well as Zahir Khan, five more offenders on the same type of sentence are set to be freed in March, official sources said, slightly higher than estimates made earlier in the week by the Henry Jackson Society.

The government said it was not aiming to retrospectively alter the sentence handed out by the court; this is a change to release arrangements that technically come under the administration of a sentence.

“It would be our position you can change those without being considered to breach an offender’s human rights,” the official said.

Diane Abbott, shadow home secretary, said Labour was awaiting the detail of the legislation but would be likely to support it, so long as the government “confine themselves to the way they administer the sentence” rather than seeking to change them retrospectively.

“Bringing in the parole board to scrutinise decisions about early release is a good idea,” she added. However, Abbott said any attempt by the government to seek a derogation from the European convention on human rights (ECHR) would be a “red line” for Labour.

Daisy Cooper, the Liberal Democrat justice spokesperson, said: “Rushing through knee-jerk legislation in the immediate aftermath of a terrorist attack, without the resource and plans to reduce reoffending on release, is not the way to prevent terrorism.

“If the Conservatives plan to pass this new law in less than three weeks, it must publish it immediately so MPs can scrutinise it.”

There has been concern from legal experts that the government’s proposals could clash with the ECHR.

Matt Hancock, the health secretary, raised further questions over Britain’s relationship with the ECHR. When asked what he made of the warnings, he said he had heard the arguments from those against the changes but that they should go ahead.

Lawyers think prisoners could try to appeal against the proposed changes as the ECHR contains guidelines on retrospective changes to prison sentences.

Hancock told Sky News: “Often in government you get a point where you have to balance the rights of different people and in this case it’s weighing up the rights of an individual who’s committed terrorist offences and his right to leave prison early against the rights of people to walk around Streatham or anywhere in our country free from the threat of terrorism.”

The convention is enforced by the European court of human rights, an institution that is separate to the EU and to which Britain remains a member and is bound by its rules.