He again served as governor of Unity State from 30 September 2005. In the April 2010 elections the state electoral body announced that Taban Deng Gai won by 137,662 votes, beating his cousin and runner-up Angelina Teny who won 63,561 votes. The results were heavily disputed, with Teny accusing Deng of having used militants to intimidate her supporters. The election contributed to the estrangement of Deng from Teny, and, by extension, from Machar. When the South Sudanese Civil War broke out, Deng initially joined the SPLM-IO rebels of Riek Machar, and became the latter's second-in-command. Deng eventually becamne the rebel chief negotiator with the South Sudanese government under President Salva Kiir Mayardit. In August 2015, the SPLM-IO and the government agreed to a power-sharing deal which left Deng deeply dissatisfied, as he was supposed to be appointed mining minister instead of petroleum minister, as he had wished. He consequently began to secretly collude with Kiir's forces. Although the SPLM/A-IO military intelligence discovered his activities, the rebel leadership refused to believe the intelligence. In April 2016, he resigned as rebel chief negotiator, claiming that had to fully devote himself to his new position as mining minister. Instead, Deng fully defected to the government after the Battle of Juba in July 2016, and officially replaced Machar as First Vice President. A substantial number of insurgents followed him, and became known as the Juba faction of the SPLM/A-IO. They subsequently began to fight alongside the government force against Machar's loyalists, resulting in Deng being regarded as "traitor" by other rebels.