The 2017 ANC elective conference was the toughest in the party's post-apartheid history. To win, incoming ANC president Cyril Ramaphosa and his team had to deftly manage the past few days. How did that work?
Protect your delegates
After months of slogging to build a constituency by using regional and provincial coordinators and senior ANC leaders, the campaign had to protect its delegates which numbered about 2,600.
This meant setting them up with accommodation, transport, catering, data and airtime. It meant building a programme of activities to keep them well occupied and also to ensure the delegates were not swayed by fixers making offers of jobs or money in return for votes.
Count your support every day
Every day, the numbers of delegates were counted in caucuses. If you lose your delegates to the competing camp, you will know from attendance at caucuses, which were held every day to assess the balance of forces.
Numbers were checked against the numbers of delegates in buses and at hotels.
Negotiate and cut deals
Ramaphosa's negotiation and deal-making smarts were leveraged to the Nth degree.
In the course of the meeting as the mathematics of the election became clearer, negotiations were held to cut deals. Just ahead of the conference, Ramaphosa invited presidential candidate Lindiwe Sisulu on to his team of candidates as deputy president.
The conference threw up serial conundrums. Later in the week, Mpumalanga joined the team, if the province's leader David Mabuza was made deputy president. The campaign needed the votes.
Have a great final push team
Ramaphosa benefited from a diligent and experienced team on the ground. His core campaign team - Marion Sparg, Bejani Chauke, Steyn Speed and Senzo Mchunu - was bolstered by various national political leaders.
They included national executive committee members Jackson Mthembu, Bheki Cele, Pravin Gordhan, Derek Hanekom, Angie and Mathole Motshekga.
Own the narrative using social media
Ramaphosa's team pushed out a regular flow of videos, images and messages to show the size and unity of his caucus and to send out messages to supporters outside.