His posts accused the government of torture and criticized Saudi Arabia’s air strikes in Yemen.
Campaign groups around the world described his sentencing as political persecution and “utterly outrageous".
For a small country, however, his case is not exceptional.
The Bahrain Institute for Rights And Democracy says there are over 4000 political prisoners in the country, which has a population of only 1.5 million.
The small island in the gulf has been cracking down on human rights activists.
Generally, those who speak up against the government are Shia and against the ruling Sunni family.
But the small kingdom wasn’t always like this, says Ali Akbar Bushehri, a Bahraini researcher and historian on Bahrain.
“We never had this [sectarian] problem - Sunni and Shia. We never felt our rulers Sunni, majority are Shi'a, because we [were] treated fairly.
"I mean for god sake [we are] the only country in the region that [can] perform Ashura, a Shi'a activity, freely and more than that, it is an official holiday” explains Bushehri.
He says such sectarian divisions hadn't been implemented until 1979, the year of the Iranian revolution.
“After the Iranian revolution, that was the start of the Shia - Sunni falling out. Before [that] there was no talk of Sunni and Shia.”
Growing up in Bahrain before the revolution, Bushehri remembers how all the different communities - Sunni, Jewish, Shia, or Hindu - lived together. This concept of ‘us’ versus ‘them’ just wasn’t an issue.
Bahrain throughout history
Throughout Bahrain’s history, the different communities coexisted relatively peacefully stresses Bushehri, despite the small island country having been conquered numerous times.
Bahrain sits close to its neighbours Saudi Arabia and Qatar and is also not far from Iran.
Surrounded by the Persian Gulf, its name in Arabic - al-bahrayn - means two seas.
Its strategic location has always made it appealing to others, be it for its fertile land, its fresh spring water or its natural pearls.
Over the centuries, Bahrain was invaded by the Persians, the Arabs, the Portuguese, and the British.
Bahrain only claimed its independence in 1971.
It has been under control by the same al-Khalifa family, since 1783. The family originates in central Arabia. Its closest ancestral tie is with Kuwait’s al-Sobah family, a cousin connection between Baharain’s King Hamad bin Isa al-Khalifa and Emir Sabah Al-Ahmad Al-Jaber Al-Sabah.
Although its history is relatively peaceful in comparison to nearby states where revolts, coup d’etats and occupations are not uncommon, it too has had its own share of uprisings.
Bahrainis did push-back," though.
“There was an era during the 90s, and an era during 80s, the 50s, even after the 20s where there has been [an] uprising by the people against the ruling family," says Sayed Ahmed Al Wadaei, a Bahraini activist and director of advocacy at the Bahrain institute for Rights and Democracy, based in the United Kingdom.
Following the Iranian revolution of 1979, the growing sectarianism during the1980s restulted in a unification in the 90s when the Sunnis and Shias pushed together for changes in the government.
It was also around this time that Bahrain started to see the concrete development of its own civil society movements.
“I think the movement started in the early 90s: the human rights movement” explains Khalid Ibrahim, the executive director of the Lebanon-based Gulf Center for Human Rights. “They established a Bahrain center for human rights and other human rights organisations and civil society gathering - so it is for the last 28 years [that] we [have] witness[ed] the emerging movement, in Bahrain.”
Uprising in 2011
One of its biggest challenges has been the uprising of 2011, says al-Wadaei. “It [is] a revolution that calls for greater freedom” he adds.
Although the uprising demanded change, Ibrahim says that prior to 2011 the situation was still better in comparison to neighbouring countries.
“[Times were] better, not ok - but in 2000s, all my colleagues who are now in prison were free. There were restrictions but at least they were publicly working for human rights” adds the executive director of the centre.
As Tunisia’s revolution in the Spring of 2011 spread across the Arabic-speaking region, many tried to imitate its success with the aim of securing democracy.
Ibrahim says that as the people took to the streets, what was initially tolerated turned ugly. Protesters were shot at with live ammunition. Troops from the Gulf Co-operation Council, the GCC - mainly from Saudi Arabia and some from the United Arab Emirates - were sent in to help quell the dissent.
“There was a major clamp-down on human rights movements. [Since then rights] defenders are either in prison or tortured, some of them killed” explains Ibrahim. “Even peaceful protesters were executed on fabricated charges.
Protesters had hoped that support might come in from the United States, the UK, or even from its neighbours.
Instead “we had the Saudis sending their troops along with the gulf states suppressing the movements, the people. [There] was complete silence from the international community” adds al-Wadaei.
Measures taken to punish dissent
Mass arrests followed by alleged torture and imprisonment were later followed by new measures to punish dissent.
“Since 2015, the government started with this process of revoking citizenship.I was one of the individuals to be revoked of my citizenship. ..and was rendered stateless.”
According to the Bahrain Institute for Democracy and Rights, over 760 Bahrainis have lost their citizenship since 2012.
In the case of the small country of Bahrain, such a crackdown means that just about everyone is caught up in it.
“You can barely not name someone who has not been in prison or is in prison as we speak” stresses al-Wadaei.
His own mother-in-law, Hajar Monsour Hadan, cousin Sayed Nizar Alwadaei and brother-in-law Mahmoud Monsour Marzooq remain imprisoned on alleged charges relating to his own work in human rights outside the country.
At end of the day, while the government continues with its crackdown, including the continued imprisonment of activists such as Nabeel Rajab, many see the repression as a wasted opportunity.
Despite initial concessions made by the government in the early days of the uprising, Ibrahim adds there is never going to be a prosperous future without respecting the civil and human rights of the people in Bahrain.