Ali Fadhil is an Iraqi comedian, whose show Here’s Baghdad satirises daily life in the city. One popular skit shows a husband and wife speaking before he heads to work. They are dramatically weeping because the checkpoints he will encounter on the roads will keep them apart for so long. It is a light take on the daily inconvenience of living under high terror alert, which has struck a chord with many Iraqis.

Yet, as Fadhil and everyone else would agree, the dangers that the checkpoints are set up to protect against are real. Last year, the death toll in Iraq was the highest since the peace of the sectarian civil war of 2006-7. According to the UN, at least 7,818 civilians and 1,050 security forces members were killed in Iraq in 2013. That violence has continued into 2014, with around 2,000 people killed in the first three months of this year. The bloody sectarian conflict in Syria has spilled over the border and reignited tensions in Iraq. Sunni tribesmen and militants linked to the jihadist group, the Islamic State in Iraq and the Levant (often known as ISIS) have taken control of parts of Anbar province, near the Syrian border.

Against this backdrop, that the election on Wednesday 30 April took place at all is something of a victory. Turnout was relatively low, and around 14 people died in election day attacks, but given the extent of violence in the days and weeks leading up to the poll, this was a good outcome.

Arguably, though, it is now that the real work begins. The results of the poll will be reported later in May. No-one is expected to win an outright majority, but the incumbent prime minister, Nouri al-Maliki, who is standing for a third term, is frontrunner to form a coalition government. This will mean difficult negotiations with rival parties from different sectarian blocs. People in Iraq are anxious about ethnic tension igniting further: no-one wants a return to the bloodshed of 2006.

Given heightened fears about a slide into all-out chaos, it is perhaps unsurprising that the election was not fought on issues of day to day governance – like the country’s dire electricity shortages or poor sewage systems – but on the fight against Al-Qaeda. Maliki positioned himself as the only person capable of fighting terror.

But he is a divisive figure. Sunni Arabs and Kurds accuse Maliki, a Shia, of being too authoritarian and too pro-Shia. It is certainly true that, since the last election, he has centralised power into his own hands, gaining control over the security forces and, it has been alleged, influence over the courts. Like many leaders the world over, Maliki claims that he needs these powers to effectively fight terrorism, but Sunni Iraqis argue he has a sectarian agenda.

His harsh crackdowns on Sunni protests have caused widespread anger, with even some Shias questioning his tactics. The resurgence of Al-Qaeda in Iraq is a frightening trend, but government repression of the Sunni population has certainly played a part in worsening the bloodshed.

Sectarian tensions run deep in Iraq. Saddam Hussein played on ethnic and sectarian divides at every opportunity, oppressing the country’s Shia majority and massacring Kurds. After the 2003 US-led invasion, majority rule was introduced, giving Shia politicians dominance. They retaliated against the Sunni population after years of repression, leading to an effective state of civil war in 2006-7. The US introduced mechanisms to ensure a balance of power between different ethnic and sectarian groups; under this system, the government must consist of a certain number of representatives from each community, with the aim of guaranteeing equal representation. Critics argue that this has been counterproductive because it forces politicians to define themselves by their sectarian allegiance, leaving no space for them to simply be Iraqi.

On election day, there were vehicle bans in much of Baghdad: another security measure in a scarred city. As it creaks back to life and the votes are counted, one must ask how the next government will manage to secure this fragile peace.