Twelve years ago, Venezuela was so divided that the government and its opposition turned to international mediators to help them talk. Today, in the wake of a month of student protests, violent confrontations, and over a dozen deaths, many Venezuelans despair of the ability of their political leaders to overcome the nation's deep divisions.

This is textbook polarisation: Large groups of people cannot discuss common issues with civility, negotiate and solve problems, or even envision coexisting in the same space. At best, polarisation means government stalemate, at worst, civil war. Can Venezuela back down from the cliff's edge? Recent lessons from around the world can help.

On the edge

Venezuela's polarisation is often thought to have begun with former President Hugo Chavez's confrontational strategy to redistribute power and resources after his election in 1998. But actually, the problem began in the 1980s, when oil revenues that had fueled an expanding middle class began to dry up and political elites failed to respond to a changing society.

Poverty more than doubled by the 1990s. An angry population ended forty years of oil-subsidised two-party democracy and ushered in the charismatic Chavez, who led Venezuela's Bolivarian Revolution for 14 years.

Chavez's death from cancer in 2013 removed the nation's political anchor. An extremely close special election in April 2013 clearly exposed the divided population. The new government of Nicolas Maduro struggled to consolidate power while the opposition, in turn, struggled to define a strategy to expand its electoral base to a majority.

Amid debates within the government over economic strategy and within the opposition over political strategy, a door opened to embryonic dialogue and cooperation to fight Venezuela's serious crime problem. For a moment, it looked as though Venezuela's polarisation might actually decrease.

That opening was lost in February, in the wake of the student protests over crime and education policy. The student protests merged with a wing of the opposition that advocated pressure in the streets to force immediate change - which some interpreted as change in policy and others as change of the government itself.

The "street strategy" overtook the longer-term strategy of another opposition wing who argued they needed to build support among dissatisfied chavistas in the poor and working classes. The government reacted in a heavy-handed way, criminalising the protests and blaming the "fascist" opposition and outside forces, while simultaneously calling for national dialogue.

Elections are unlikely to resolve the tensions - none are scheduled until late 2015. Must the polarisation lead to more violence?

Extremism, radicalism and unhelpful outsiders

For those who prefer rule of law and political debate to civil strife, polarisation poses three challenges. First, extremist voices often drown out moderate voices. Extremists intimidate those who want to look for compromises by calling them traitors or appeasers. Polarising leaders create an "us" versus "them" dynamic, and drive their followers to fear and hate the other side.

Second, when long-marginalised groups finally gain power, they often believe they may never get another chance and that they may face retribution if they lose power, so they push for swift, radical changes. Egypt's Muslim Brotherhood leader Mohammed Morsi seemed to believe that when he acted unilaterally to drive through a new constitution rather than build a broader coalition, provoking a backlash from secular groups and the military.

Third, outside nations often exacerbate polarisation. In Haiti in the early 2000s, the government believed US Democrats, especially the Congressional Black Caucus, would back them, while the opposition thought they had US Republican backing.

Both sides therefore resisted efforts to mediate their crisis. In the "Islamic Cold War", Sunni and Shiite governments have intervened on opposing sides in several Middle East domestic conflicts. And even before its current crisis, Ukrainian politics have long been pushed towards polarisation by Russian patronage for one side and European and US patronage for the other.

Three ideas to save Venezuela

To step back from the brink, Venezuelan leaders should recall their own history of international mediation a decade ago, learn from recent moves in Cuban-US relations and in Tunisia, and avoid Egypt's missteps. How? Three ideas can address the triad of polarisation challenges.

First, they must create political space for moderates. There are always people who want a functioning political process that finds common ground. The first key to begin dialogue and problem-solving is to give them ways to speak out and act.

Look at the Cuban diaspora today - after 50 years of insisting on a US embargo against the island, Cuban-Americans are now the biggest engines of the small entrepreneurial economy growing in Cuba. Recent polls show for the first time that a majority of Cuban-Americans now favour ending the embargo. One reason this changed is that both President Barack Obama and Cuban President Raul Castro provided small openings that allowed Cubans in the US to connect with Cubans on the island, legitimising challenges to radical voices on both sides.

Second, they must calm fears on both sides. When threatened, oppositions cannot participate in negotiations to resolve crises. Both the government and the opposition need to provide mutual reassurances that their core interests will not be attacked, backing away from violence and giving signals of good faith.

After the killing of two opposition leaders in Tunisia in 2013, a national dialogue process began between the governing Islamist Ehnnadha party and secular opposition parties. This produced a political deal four months later in which the government agreed to step aside once a new constitution was adopted, and allow a technocratic caretaker administration to govern until new elections.

By contrast, the Egyptian military followed the opposite tack after they removed Mohamed al-Morsi, jailing hundreds of his supporters in the Muslim Brotherhood and refusing to invite broad participation in the group reviewing the constitution. Is it any surprise Tunisia's transformation is widely viewed as a success, while Egypt appears to be lurching in circles?

In Venezuela, security forces responded to initially peaceful protests with disproportionate force. The government criminalised protest by jailing students and political leaders. These were mistakes. To diffuse tension, government should release detainees and rein in security forces. In turn, opposition leaders should continue to denounce violence and make clear they are not seeking the removal of the government by unconstitutional means.

Third, they must establish secure dialogue. Communication can reduce polarisation when both sides agree on a facilitator, an agenda, rules of engagement, and ultimately, an enforcement mechanism for any agreements they reach. The facilitators may be internal actors, such as the Tunisian "Quartet" made up of labour unions, the bar association and the human rights league who facilitated the 2013 talks among the political parties. Or they may be external actors.

In the Bolivian crisis during constitution-drafting in 2007-08, the South American Union UNASUR helped mediate a compromise. In 2002 in Venezuela, the OAS Secretary General, supported by UNDP and The Carter Center, facilitated a seven-month negotiation that resulted in an agreement, though it failed to include an enforcement mechanism.

These methods work. By creating space for moderates, reducing fear, and agreeing to a dialogue process, Venezuela can find its way back from the brink. Increased polarisation, with all its risks, make these steps imperative.

Jennifer McCoy is Distinguished Professor of Political Science at Georgia State University, Americas Programme director at The Carter Center, and coauthor of International Mediation in Venezuela.