On the morning of 1 July, Ugandans woke to find they could not read their WhatsApp messages, scroll through the chitchat on Facebook and Twitter, or post a picture of their Sunday lunch on Snapchat.

The east African country’s new social-media tax had taken effect. To access any of the more than 60 online platforms listed as “Over The Top (OTT)” – chosen by the government because they offer voice and messaging services – they were expected to pay a tax of 200 Uganda shillings (4p) a day. This translates to about £1.20 a month, or £14.60 a year, in a country where nearly a quarter of the population lives on less than £1 a day.

President Yoweri Museveni, who has ruled Uganda for the last 32 years, says the tax is needed to generate revenue to turn the impoverished country into a middle-income one by 2020. He reasons that social media is simply a place for idle gossip. What he really means is that the millions of people who use social media in Uganda – many of them young, unemployed and discontented with a government that offers no real prospects for their future – are making it hard for him to display a show of democracy and progress to the international world.

After all, African children are supposed to listen to their elders and no decent African can allow children – especially not the errant millennials who seem to have a mind of their own – to disgrace them in public. The 73-year-old Museveni, like many other African presidents, has decided that it is better to silence his critics than to address their issues. From Tanzania (where it now costs £700 to blog, higher than the average annual income of £660) and Kenya to the Democratic Republic of the Congo and Cameroon (where the internet has been shut down during elections), many governments on the continent are struggling to control the network.

In Uganda, too, the government shut down the internet during the 2016 elections amid allegations of vote rigging. The government has also closed down critical media and had a university professor arrested for calling the president “a pair of buttocks” because of his failure to fulfil a campaign promise to provide free sanitary pads to schoolgirls. Museveni and his ilk are so engrossed in attempts to muzzle criticism that they ignore the ubiquitous nature of the internet and the fact that trying to shut up people can instead make them louder.

Most Ugandans have vowed not to pay the tax and installed virtual private network (VPN) software on their smartphones, allowing them to return to Twitter and Facebook and taunt the government – from Canada, the UK, Croatia or wherever the VPN is based – with hashtags such as #ThisTaxMustGo and #NoToSocialMediaTax.

The African states that are trying to shut down the ​internet are also some of the most corrupt

Activists have also sued the government for imposing a tax that they say violates their right to freedom of expression and access to information.

Panicked, Uganda’s parliament has returned early from its recess to discuss the tax, alongside another tax on mobile money users that has also drawn ire. The police, who only a week earlier had allowed a march against the killings of women in the outskirts of the capital, Kampala, used teargas to disperse people who took to the streets to protest against the social-media tax.

Museveni’s relentless pursuit of development and his unabashed sneer at human rights and democracy are a worrying echo of China’s approach of putting development before human rights. People are thrown off their land without compensation to make way for government projects and government-backed private investors in preparation for Uganda’s much-awaited oil boom. Big companies, including those from China, are given tax holidays and exemptions while small local ones are taxed out of business. The World Bank says Uganda should be collecting double what it currently does in taxes and the Uganda Tax Justice Alliance estimates that between 1970 and 2010 the country lost £6.4bn in illegal capital flight.

Ugandans are angry because they feel that their taxes are already too high and have not translated into a better life. How else would they feel when they go to hospital and are turned away because there are no mattresses or medicine? Or when public education is of questionable quality and parents are forced to pay for private schools with their already meagre income. Or when the road is full of potholes, fuel is too expensive, and the public transport system non-existent. Or when having an education is not a guarantee that you will get employment. And now they must pay even to vent anger about their woes online.

African states that are trying to shut down the internet are also some of the most corrupt. In many of these countries, it is risky to speak out against the government. In Uganda five or more people can gather only with police permission. The internet remains the only safe space for expressing dissent and demanding accountability – a thing many African leaders are not used to giving their citizens.