MURSITPINAR, Turkey - Turkey’s parliament Thursday authorised military action in Syria and Iraq against the Islamic State militant group, whose fighters have battled their way to the doorstep of a key Kurdish border town.

The move allows the deployment of Turkish armed forces in the two neighbouring countries, as well as the transit of foreign forces in Turkish territory for operations against Islamic State (IS) militants.

The broad mandate does not commit Turkey to sending soldiers into Syria and Iraq, where IS has captured large areas, declaring an Islamic “caliphate” and committing widespread atrocities.

In Iraq IS launched attacks on two police and army bases that left dozens dead, mostly militants.

It came as Kurdish militiamen backed by US-led air strikes were locked in fierce fighting to prevent the besieged Syrian border town of Kobane from falling to IS.

Heavy mortar fire around the town was heard across the Turkish border, an AFP correspondent reported.

“There are real fears that the IS may be able to advance into the town of Kobane itself very soon,” the Syrian Observatory for Human Rights warned.

The Britain-based watchdog reported fresh US-led air strikes on the advancing militants overnight after the heavily outgunned Kurdish fighters were forced to fall back west and southeast of the town, also known as Ain al-Arab. A Kurdish official inside Kobane acknowledged that the better armed IS fighters had advanced during the night. “They are closer, two to three kilometres (less than two miles) in some places,” Idris Nahsen told AFP by telephone. “Compared to IS, our weaponry is simple. They have cannons, long-range rockets and tanks.”

The UN human rights chief described the array of violations and abuses perpetrated by IS and associated groups as “staggering”. “Many of their acts may amount to war crimes or crimes against humanity,” Zeid Ra’ad Al Hussein said.

His office accused the militants of crimes “on a massive scale,” including beheadings, abductions, torture and forcing women and young girls into sexual slavery.

As the militants neared the outskirts of Kobane, there was a quickening of the exodus of civilians which had already seen tens of thousands take refuge across the border in Turkey. “Kobane is practically empty of its residents now,” Observatory director Rami Abdel Rahman told AFP.

The town would be a major prize for IS, giving it unbroken control of a long stretch of the Syrian-Turkish border. The authorisation for Turkish military action was supported by 298 deputies in the 550-seat chamber.

The United States is pressing Ankara for the use of its Incirlik air base in southern Turkey by US jets launching assaults against IS in Syria. But it is unclear if Turkey will allow the transit of lethal weaponry and may restrict the authorisation to humanitarian aid and non-lethal supplies.

Turkish President Recep Tayyip Erdogan pressed the West on Wednesday to find a long-term solution to the crises in Syria and Iraq, saying dropping “tons of bombs” on IS would provide only temporary respite.

US officials kept up their warnings that such a solution would take time. Retired US general John Allen, who is leading the international effort against IS, told CNN “it could take years” to train a Syrian rebel force to take on the militants.

Washington is counting on defeating IS fighters first in Iraq through a combination of Kurdish forces, Iraqi army troops, Shiite volunteers and a militia or “national guard” of Sunni Arab tribes — which does not yet exist.

In Syria, the US is pinning its hopes on training and arming a new rebel army composed of vetted “moderate” recruits, at a rate of about 5,000 fighters a year.

Even in Iraq, the fightback is proving slow, despite coalition air support.

At least 17 members of the Iraqi security forces were killed along with 40 militants in the overnight attacks on two security force bases in the west of the country. It came a day after bombings rocked both the Iraqi capital and Syria’s third-largest city Homs, where 47 schoolchildren were among the dead — prompting hundreds of people to take to the streets in protest Thursday.