Is Jeremy Corbyn, the radical leftist elected by Britain’s Labour Party to be its leader, unelectable as UK’s Prime Minister? Is Donald Trump, the outspoken, outlandish and controversial front-runner for the Republican Party nomination for President in the US unelectable? Conventional wisdom would suggest that both men (who couldn’t be more distinct from one another; left pole-right pole) would struggle to win the leadership of their countries, even if they conquer their parties. But conventional wisdom can be wrong.

Just ask a certain Narendra Modi. For the longest time, from 2002 right until early 2014, conventional wisdom suggested that the then Gujarat Chief Minister was simply unelectable as India’s Prime Minister. He was too right wing, even by BJP standards. After all, had not the poster-boy of the Hindu Right “presided over communal carnage” in his home state? Was he not unapologetic about his failure to stop the violence? Modi wasn’t hesitant to be provocative in speech and was particularly merciless against the establishment, whether his own or the opposition’s. Even in terms of his economics, the man of the minimum government, maximum governance vision (with few freebies to offer) was seen too far to the right of a basically centrist India. Privately, in 2013, most Congressmen saw his anointment as the BJP’s Prime Ministerial candidate as their best chance to salvage a “win” in 2014 despite running a shambolic government. In their view, “extremist” Modi would just not win enough votes.

What actually happened is now recorded in the annals of history. But it may be useful for other politicians who are painted with the same brush of unelectability that Modi was to study his path to victory. There are junctures in history where voters tire of glib mainstream politicians who practise an “extreme” centrism, trying to be (and mean) everything for everyone. What they lack is authenticity. Just as Modi was viewed as an outsider to New Delhi’s establishment, Corbyn and Trump are seen as rank outsiders to London and Washington, DC’s establishments, respectively.

But when does being an outsider turn into an asset? Usually, when the ruling establishment has made a mess of running the affairs of government or when the economic scenario is grave. In Modi’s case, the bungling UPA government had manufactured an economic crisis and made the ground fertile for his rise. In the UK, Jeremy Corbyn would need the Conservatives to run a shabby second term government to facilitate his election. Or he would need their economic strategy (based on the orthodoxy of austerity readily embraced by the mainstream of his own party) to fail. The fact is that the continued economic slowdown in the advanced economies is laying the ground for radical parties of the left and right (think Syriza in Greece, or the National Front in France) to evolve from being plainly unelectable to respectable mainstream choices for voters. Of course, while the US economy is doing better in Europe, Trump’s populism on issues like immigration in a struggling economy with high levels of inequality is striking an unexpected chord.

Of course, what may work to win over your party may not be enough to win over the country. Candidates viewed as too extreme for mainstream acceptability have to also help themselves and not simply rely on others to make mistakes. Modi eschewed altogether the shrill Hindutva rhetoric once he was candidate for Prime Minister. He focused on what he believed was his core appeal: an outsider who can fix a broken system of government and repair the economy. But he did that after he had covered his right flank and secured his position within his own party. Corbyn and Trump, if they want to lead their countries, will have to moderate some of their more extreme positions. Corbyn has a winning persona (he is a straightforward simple living politician), but some of his policy pronouncements (on supporting Hamas and Hezbollah for example, or nationalising most of Britain’s industries, or penalising the rich) will need to be stashed away. To become electable, he needs to project his core appeal: authenticity and anti-austerity. Donald Trump could also smooth his edges, cut down on blatantly offensive rhetoric on women and immigrants. He too needs to highlight the more attractive bits of his candidacy.

Of course, there is no guarantee that either Corbyn or Trump will moderate or that either will win even if he moderates. But only highly complacent opponents will believe that they can win just because someone else is apparently unelectable. The line between who and what is electable and not, can quickly change.