There were scarcely any hints of the tumultuous years that would follow the swearing-in of Dr John Pombe Magufuli on 5th November 2015 as Tanzania's fifth president. After all, his Chama cha Mapinduzi (CCM) had been in power for decades, and his victory seemed to herald continuity with the past.
In fact, Magufuli's opponent attracted more attention during the campaign than Magufuli himself. When Edward Lowassa defected from CCM to the opposition and ran for president against his old party, it looked fleetingly as though this elite split might spell the end of CCM's dominance.
But Magufuli has not brought continuity, but dramatic change. He began to impress just days after his inauguration. He made a snap unannounced visit to the Ministry of Finance on his first day as president. Then he pulled funds intended for Independence Day celebrations and redirected them to anti-cholera operations. He began a shake-up of the Tanzania Port Authority, and extended it to the Tanzania Revenue Authority as he launched a tax collection drive. An audit of the public payroll led to a purge of "ghost workers". Quickly, it became apparent that he was genuinely waging war on corruption in the Tanzanian state.
The primary victims of these anti-corruption operations have been mid- and low-ranking civil servants. However, Magufuli has taken on high elites in CCM selectively too. In May, he fired Minister of Energy and Minerals Sospeter Muhongo. This June, CCM MP Andrew Chenge found himself in court, facing government prosecutors in court. Both were linked to a major corruption case, the Escrow Scandal in 2014.
This thrift and intolerance for corruption won Magufuli attention and admiration worldwide. In the social media sphere, commentators celebrated his zeal playfully with the hashtag, "#WhatWouldMagufuliDo".
But since early 2016, it has become apparent that Magufuli is not just waging war on corruption - he was also declaring war on democracy.
War on democracy
Magufuli has overseen numerous closures and suspensions of media outlets. His officials have encouraged and tried to exacerbate a split in the Civic United Front, by backing one side. His government has undermined judicial and parliamentary independence, implemented a partial ban on public rallies, harassed MPs, closure of online political space, and prosecuted critics under new defamation and sedition laws.
Together, these constitute major infringements on the freedom of expression and the opposition's ability to communicate with voters.
In March this year he announced at a press conference that:
Media owners, let me tell you: 'Be careful. Watch it. If you think you have that kind of freedom -- not to that extent'.
In part, this repressive streak is a return to form. CCM has a long history of authoritarianism. It has ruled Tanzanian uninterrupted since 1977, and its predecessor parties ruled Tanganyika since 1961.
But there is a more immediate reason that Magufuli is tightening the noose on the opposition. The opposition has never been so strong. In 2005, CCM's Jakaya Kikwete won the presidential election with an unassailable lead of 68% over the runner-up. By 2015, CCM's margin of victory had been shortened to 18%. For the first time in Tanzania's history, the opposition is a force to be reckoned with.
The most plausible explanation for Magufuli's authoritarian turn is that he is trying to minimise the possibility of an opposition victory in the future. Equally, every time he advances the anti-corruption agenda, he makes more enemies who might defect to the opposition. By narrowing space for opposition, he reduces the risk of them doing so.
But Magufuli is not only relying on repressive means to stay in power. He is also pursuing a programme that revives his popularity.
The Magufuli way
The third and most recent theme in Magufuli's presidency has been a confrontation with multinational mining companies.
The controversy was kick-started this is the alleged discovery that Acacia Mining has been under-reporting of mineral exports earlier this year. Magufuli has argued that multinational mining companies have been stealing Tanzania's resources for years.
Based on these claims, the government charged Acacia Mining with fines and back-dated taxes amounting to USD$190 billion. Magufuli even threatened to nationalise the mines. His strategy of brinkmanship worked. On October 19th, Acacia's parent company Barrick Gold announced that it had reached an agreement with the Tanzanian government. It promised to find ways to further process copper-gold ores in Tanzania, instead of exporting them for smelting, and it made a number of pecuniary concessions.
There is a strategic thread that ties together Magufuli's actions.
Tanzania's fifth Five Year Plan restores industrialisation to the heart of government policy in a way unseen since the 1970s. Domestic processing and tax revenue is central to that plan. So is government discipline, thrift and tax collection. The closure of political space keeps CCM in power to implement it, and suffocates internal opposition to his reforms.
But the definitive feature of Magufuli's first two years has been a talent for pursuing his programme of reform while pursuing domestic popularity at the same time. His taste for the dramatic has caught public attention and his willingness to disturb the status quo has convinced many that his intentions are more sincere than those of his predecessors. Perhaps more than any other president since Tanzania's founding father, Julius Nyerere, Magufuli is seen as a man of integrity.
While Magufuli has skilfully coupled popular politics with fundamental reform, he has also precipitated a series of unintended changes which may be slipping beyond his control.
His demands from companies have unquestionable merit, but they are also making businesses think twice about operating in Tanzania. For example, a number of oil companies are due to begin negotiations about developing off-shore gas fields. After the debacle with mining companies they know that they will not get an easy deal, but they may also doubt the word of a government that has in effect torn up contracts, and repeatedly placed the president at the centre of contract negotiation.
Equally, by putting such pressure on the opposition, Magufuli may make it stronger. Attempts to divide the second opposition party, the Civic United Front, may drive them closer to Chadema. They may also unintentionally make martyrs of the opposition. An attempted assassination attempt transformed opposition politician Tundu Lissu into a national hero.
It is not known who is behind the drive-by shooting that hospitalised Lissu, in which at least 28 shots were fired, but Lissu was among the most vocal opponents of the government. He was being tried in court for sedition just days before he was shot. No matter who was behind the attack, it is fast becoming the public image for the extremes of political change in Tanzania under Magufuli.
Many underestimated Magufuli at his inauguration two years ago, but few do now. While Magufuli's election represents the continuation of CCM rule, he has brought about profound change. Only time will tell whether the intended or the unintended consequences of his actions will be those that define his legacy.
Dan Paget is a member of the Labour Party of the United Kingdom