The amendment would require websites to keep a full record of people who post online comments

Basil McCrea’s proposal to change the law would also compel every website which “provides an online platform for people to post any public content” to “maintain a full record of a person’s identity and to establish any linked accounts”.

The NI21 leader’s amendment to the Justice (No. 2) Bill has been tabled without any press release to announce what would be a significant legislative change.

It is not clear whether Mr McCrea has consulted with technology companies or the police about his proposals, which will be voted on by MLAs next Wednesday.

Sign up to our daily newsletter The i newsletter cut through the noise Sign up Thanks for signing up! Sorry, there seem to be some issues. Please try again later. Submitting...

The News Letter attempted to contact Mr McCrea several times on Thursday but he did not return our messages.

The Lagan Valley MLA’s amendment – which runs to more than 700 words – would make it an offence punishable by up to a year in jail or a fine of up to £5,000 for someone “without lawful authority or reasonable excuse” who “intentionally or recklessly shares a harmful electronic communication” that either “includes sexually explicit content of another person” or “causes alarm, distress, or injury including psychological harm to another person”,

However, if the messages meet another set of criteria – one of which is that they are “part of an ongoing campaign of harmful communication” – the individual could be jailed for up to seven years or given an “unlimited fine”.

Even if a court did not convict someone of those offences, the bill would allow judges to order that the material be deleted and an apology issued.

The proposal would also force websites which allow people to comment to keep details of every user’s identity and, if an individual was the subject of a “harmful communication” they could apply to the website to have “the perpetrator identified”.

A spokesman for Twitter said that the company had “no comment” on the proposed legislation.

Mr McCrea’s proposal is one of 100 amendments to the Justice (No. 2) Bill.

Some of the proposals in Mr McCrea’s amendment are already covered by existing law.

The amendment refers throughout to “harmful electronic communications”, which it defines as “any method of electronic communication which would be grossly offensive, threatening, intimidating, or menacing to a reasonable person”.

But, under section 127 of the Communications Act 2003 it is already a crime (with imprisonment of up to six months) to send a grossly offensive, indecent, obscene, menacing or false communication.