Shia cleric Muqtada al-Sadr has always been a controversial political operator in Iraq - the most popular among Shia leaders, the most temperamental, and the most unpredictable. His solid popular base has given him a very strong bloc in almost every Iraqi parliament since 2003 and has allowed him to manoeuvre through Iraqi politics like no one else.

His political life has been characterised by constant u-turns and controversial moves. He was one of the few Shia leaders to remain in Iraq under Saddam Hussein's regime and again one of the few who openly opposed the US presence in the country after the 2003 invasion. During the sectarian civil war (2004-2008), he led the Mahdi Army militia which was notorious for its violence against the Sunni community and which paved the way for the proliferation of Shia militias.

Yet after the 2010 elections which brought a second term for the increasingly sectarian Prime Minister Nouri al-Maliki, al-Sadr switched to a moderate political line and reached out to the Sunni community. In January 2013, he even went as far as joining a Sunni prayer at Shaykh Abdul Qadir Gilani Mosque in Baghdad.

He has also kept one foot in the government camp and another in the opposition. He would take part in the political process by having his Sadrist Movement run in the elections; he would secure enough votes to get seats in parliament and ministerial posts in the government. And yet, he would also lead protests against that very same government and call for reform.

He worked hard to develop strong ties to the opposition which was mostly secular and dominated by civil society activists. His cooperation with consecutive protest movements since 2011 allowed him to engage in a unique dialogue with this camp that was traditionally seen as an opponent to everything the likes of al-Sadr stood and worked for.

This dialogue with the secularists resulted in an uneasy and unpopular but necessary alliance between them and the Sadrist Movement, at least from the perspective of the protest movement. Many saw this fragile alliance as an important pillar for rebuilding a diverse country like Iraq. But the majority in both camps were uneasy about it.

While playing with both the ruling elite and the opposition, al-Sadr maintained his militia, occasionally reinventing it under different iterations. Both the government and the opposition were able to live with that.

This position enabled al-Sadr to lead a double political life. On one hand, he was a member of the ruling class and had a say in almost every key decision that it made. On the other hand, he was close to the opposition which was pushing for political change.

During the past nine years, al-Sadr provided pivotal support for the protest movements in Iraq, mobilising people to come out and demonstrate. His main slogan was always reform - ie, he wanted the existing political architecture to remain the same, with occasional reorganisation and change of guard in government posts.

This reform-focused agenda was what kept all the protests harmless for the government and the ruling political class. Every time the protests reached a new peak, al-Sadr would give a new ultimatum to the government, get promises of reform and send the protesters home.

This strategy made him more and more powerful within the government, giving him leverage over his political opponents. But his political games did not go unnoticed and created tensions within the protesters' camp, which split into two fronts. The older politicians who believed in the "historic" alliance with al-Sadr clashed with those who criticised him for riding the protest wave to get more political gains.

Last fall, however, al-Sadr's political game seemingly began to unravel. On October 1, protests broke out which took a very different shape than those in the past. The protesters were younger, more spontaneous and less political. Many of them were his supporters, but they took to the street on their own, without being ordered to do so, and they stressed that they do not want anyone to "ride the wave" this time.

When the government and security realised that al-Sadr was not behind the protests, they used extreme violence against them. In the first week of the demonstrations more than 150 people were killed and some 3,000 injured. This angered the protesters and pushed many more to come out in the streets. On October 25, the protests came back with renewed, powerful momentum.

It was then that al-Sadr decided to join, but as a protector of the protesters not as a leader, sending his "blue hats", members of his Saraya al-Salam militia, to the squares. His side-door entry into the protests was meant to allow him to gradually assume leadership, but the protesters knew better. They kept their distance, making sure their tents were separate from the Sadrists', and made clear their rejection of all political leaders. "The people want the downfall of the regime!" became their slogan; they clearly were not going to leave the squares after another promise of reforms.

As the violence against them escalated, so did their chants against Iran, which many blamed for the repeated brutal crackdowns. General Qassim Soleimani, the head of the Quds Force of Iran's Islamic Revolutionary Guard Corps, travelled multiple times to Baghdad to direct the security response. As the protesters pressed for the resignation of Prime Minister Adel Abdul Mahdi, the Iranians doubled-down on him.

Since September, al-Sadr, who had been in Iran's holy city of Qom, where he is studying to obtain the rank of a jurisprudent (or ayatollah), was reportedly pressed to take leadership of the protest movement. On October 29, he appeared personally in Najaf, but the crowds rejected his presence and he returned to Iran. It was clear he had failed. A month later Abdul Mahdi submitted his resignation.

The January 3 assassination of Soleimani and Abu Mahdi al-Muhandis, deputy chief of Iraq's Popular Mobilisation Forces (PMFs, also known as PMUs), however, was a major shock to the system and threatened to undermine the protesters' gains, as pro-Iranian elements in Iraq tried to rally sectarian outrage.

These events were a game changer for al-Sadr, who felt that he could not stay in the middle any more. He has reportedly come to believe that the protests were no longer about reforms but change which could threaten his comfortable position on the Iraqi political scene.

People close to him say that the Iranians have convinced him that he would face a serious threat to his life if he were to go back to Iraq and that they can only protect him if he remains in Iran. In December, an associate of his reported that a drone dropped a bomb on his home in Najaf, hitting its outer wall, although he did not indicate who was suspected of carrying out the attack.

Al-Sadr decided to join the pro-Iran forces. In mid-January, he called for a million-man march to expel the US troops from Iraq, but the turnout was poor.

The protesters, in turn, rejected both Iranian and US interference in Iraq and criticised the Sadrists' attempt to derail their movement. Shortly after, al-Sadr sent his blue hats to "weed out the saboteurs and the intruders" from the protest. Seven people were killed and 150 injured in the ensuing clashes.

All of this was accompanied by a stream of contradictory tweets by al-Sadr. Over four weeks, he moved from being suspicious of the protests to supporting them, then withdrawing his supporters from the streets just after his anti-US march, only to send them back to attack them. But contrary to what he was expecting, people continued to stream into squares to show solidarity with the protest movement.

In the face of yet another failure of his strategy, he may yet again change his mind. The initial signs of a possible shift in his position appeared in his latest tweet titled: "the charter of the reform revolution".

As of the time of writing this article, none of his closest aides has spoken to him in person. He is reportedly talking to them only through Facebook messenger and WhatsApp. But just like the public, they too are kept in the dark about his intentions. Like the rest of us, most of his followers and aides get his direction from his Twitter feed.

This may be the first time that al-Sadr has had a head-on collision with his support base. His most ardent followers will stick by him, but it is clear he is losing his clout in the streets. As a result, his position may be weaker in the next election.

How far his image will be eroded by this collision remains to be seen. As long as he retains his militia, al-Sadr will surely remain a powerful player in Iraqi politics. However, it is increasingly clear that this protest wave has upset his political game.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.