BAGHDAD - Fighting erupted at the northern approaches to Baghdad Tuesday as Iraq accused Saudi Arabia of backing militants who have seized swathes of territory in an offensive the UN says threatens its very existence.Since the insurgents launched their lightning assault on June 9, they have captured Mosul, a city of two million people, and a big chunk of mainly Sunni Arab territory stretching south towards the capital. The offensive has displaced hundreds of thousands of people and sent jitters through world oil markets as the militants have advanced ever nearer Baghdad leaving the government in disarray.Officials said on Tuesday that militants briefly held parts of the city of Baquba, just 60 kilometres (40 miles) from the capital.They also took control of most of Tal Afar, a strategic town between Mosul and the border with Syria, where ISIL also has fighters engaged in that country’s three-year-old civil war.The overnight attack on Baquba, which was pushed back by security forces but left 44 prisoners dead at a police station, marked the closest that fighting has come to the the capital.In Tal Afar, militants controlled most of the town but pockets of resistance remained. Soldiers, police and armed residents held on to parts of its airport, the deputy head of the provincial council, Nureddin Qabalan, said.Further south, security personnel abandoned the Iraqi side of a key crossing on the border with Syria, officers said. Syrian rebel groups opposed to ISIL, who already controlled the other side of the Al-Qaim crossing, advanced across the border to take over. In ethnically mixed Kirkuk province, militants took control of Multaqa village, but were repelled by security forces in Bashir village.The swift advance of the militants has sparked international alarm, with UN envoy to Baghdad Nickolay Mladenov warning that Iraq’s territorial integrity was at stake. “Right now, it’s life-threatening for Iraq but it poses a serious danger to the region,” Mladenov told AFP. “Iraq faces the biggest threat to its sovereignty and territorial integrity” in years.The violence has stoked regional tensions, with Iraq accusing neighbouring Saudi Arabia on Tuesday of “siding with terrorism” and of being responsible for financing the militants. The comments came a day after the kingdom blamed “sectarian” policies by Iraq’s government for triggering the unrest. The prime minister of Iraq’s autonomous Kurdish region told the BBC it would be “almost impossible” for the country to return to how it was before the offensive, and called for Sunni Arabs to be granted an autonomous region of their own.Alarmed by the collapse of much of the security forces in the face of the militant advance, foreign governments have begun pulling out diplomatic staff.US President Barack Obama announced that around 275 military personnel “equipped for combat” were being deployed to Iraq to help protect the embassy in Baghdad and assist US nationals.Washington has already deployed an aircraft carrier to the Gulf, but Obama has ruled out a return to combat in Iraq for US soldiers. As the US weighed its next move, Secretary of State John Kerry said on Monday that drone strikes could be used.Washington has ruled out cooperating militarily with Tehran, but the two governments - which have been bitter foes for more than 30 years - held “brief discussions” on the crisis in Vienna.Drones have been used by the US against militants in Afghanistan, Pakistan and Yemen, but have been criticised by human rights groups for their heavy civilian toll.Doubts are growing that the Iraqi security forces can hold back the militant tide, despite military commanders trumpeting a counter-offensive.Soldiers and police fled en masse as the insurgents swept into Iraq’s second city of Mosul a week ago, abandoning their vehicles and uniforms.The jihadists are said to have killed scores of Iraqi soldiers as they pushed their advance, including in a “horrifying” massacre in Salaheddin province that has drawn international condemnation.Top cleric Grand Ayatollah Ali al-Sistani has called for volunteers to join the battle against the militants and thousands have signed up.More have returned home from neighbouring Syria, where they had been fighting alongside government forces against the rebels there, a monitoring group said.