Egypt has adopted a law that threatens to jail anyone who browses censored websites, after having already blocked dozens of sites belonging to human rights groups and critical media.

The law, ratified by Abdel Fattah al-Sisi, the president, on Saturday, gives courts the power to block websites deemed a threat to national security.

The decision may be appealed, but if upheld anyone who browses the censored websites faces at least one year in prison and a fine.

Sharing content from those websites could result in a minimum prison sentence of two years.

Starting last year, Egypt began blocking websites of news organisations such as Qatar's Al Jazeera broadcaster which has supported the banned Muslim Brotherhood group, and the web pages of some organisations such as Human Rights Watch, which published reports on rights abuses.

The Huffington Post was also banned, whose Arabic website published articles critical of the Egyptian leadership.