Separate gun attacks north of Baghdad killed 12 security members -- eight soldiers and four militiamen -- Friday, a second deadly day in Iraq as it nears the 10th anniversary since the US-led invasion. The violence comes a day after a string of coordinated bombings and a brazen assault on a ministry complex in the capital left 18 people dead, with barely a month to go before the country holds its first elections in three years. In Friday's deadliest attack, gunmen killed eight Iraqi soldiers as they were on their way to report to their unit in a town north of Baghdad, security and medical officials said. The soldiers had set off from the town of Qaiyarah in the northern province of Nineveh and were headed to a military camp in Taji, 25 kilometres (15 miles) north of Baghdad. When they were about half way along the route and near the town of Baiji, gunmen opened fire on their minibus, causing it to overturn, at which point the militants shot at the soldiers. In all eight were killed, and although at least one survived the gun attack he was badly wounded, security and medical officials said. The attackers managed to flee the scene before emergency services arrived. Earlier on Friday, gunmen in military uniforms attacked the house of an Iraqi anti-Al-Qaeda militia leader north of Baghdad, killing him and three of his sons, police and a medic said. The gunmen bound their hands and killed Khalil al-Ajili and one of his sons in the house near Baquba. Two other sons tried to escape but were killed in a nearby field. With the latest attack, 17 members of the Sahwa anti-Qaeda militia forces have been killed this month. The Sahwa are made up of Sunni Arab tribesmen who joined forces with the US military against Al-Qaeda from late 2006, helping to turn the tide against the insurgency. The violence comes after a new study released on Friday estimated that the conflict in Iraq cost the lives of at least 116,000 civilians and more than 4,800 coalition troops between the outbreak of war in 2003 and the American withdrawal in 2011. The report, published in the British peer-reviewed journal The Lancet, also estimated that the United States' involvement in Iraq had so far cost it $810 billion (625 billion euros) and could eventually reach $3 trillion. In addition to the upcoming 10th anniversary of the invasion that ousted Saddam Hussein, the violence comes just weeks before April 20 provincial elections, the country's first vote since parliamentary polls in March 2010. Several candidates for next month's polls have also been targeted. On Thursday alone, one candidate and her husband were shot dead by gunmen, a bombing targeted another prospective provincial councillor, who escaped unhurt, and one was kidnapped along with his father and other relatives north of Baghdad the night before.