Bahrain has followed the United Arab Emirates in announcing that it would fine and jail anyone expressing sympathy for Qatar over sanctions imposed by its Gulf neighbours.

Saudi Arabia, the UAE, Bahrain and Egypt on Monday cut diplomatic ties with Qatar over accusations that the emirate is a champion of extremist groups in the region.

Qatar firmly denies the allegations.

"Any expression of sympathy with the government of Qatar or opposition to the measures taken by the government of Bahrain, whether through social media, Twitter or any other form of communication, is a criminal offence punishable by up to five years in prison and a fine," a Bahraini interior ministry statement said.