* Erdogan says U.N. Security Council inaction encouraging Assad
* Syrian gov't forces hit rebels with air power, artillery
* Rebels establish fragile hold on town on Turkish border
* Turkey says will retaliate again if more border violations
Turkish Prime Minister Tayyip Erdogan rebuked the U.N. Security Council for inaction over Syria on Saturday, saying the world body was repeating mistakes that led to massacres in Bosnia in the 1990s.
President Bashar al-Assad's forces used air strikes and artillery to bombard insurgents on several fronts in Syria, as the 19-month-old conflict risks dragging in regional powers.
Turkey is increasingly entangled after intercepting a Syrian airliner carrying what it said were Russian-made munitions for the Syrian army, infuriating Moscow and Damascus. It has led calls for intervention, including no-fly zones enforced by foreign aircraft to stop deadly air raids by Assad's forces.
But there is little chance of U.N. support for robust action. China insists any solution to Syria's crisis must come from within while Russia has said many Syrians still support Assad. Western nations meanwhile are loath to commit to any military action that could touch off a regional sectarian war.
"The U.N. Security Council has not intervened in the human tragedy that has been going on in Syria for 20 months, despite all our efforts," Erdogan told a conference in Istanbul attended by leaders including Arab League Secretary General Nabil Elaraby. "There's an attitude that encourages, gives the green light to Assad to kill tens or hundreds of people every day."
The bloodshed has worsened markedly in the past two months although neither side has been able to gain a distinct advantage, with government forces relying heavily on air power and artillery to batter the rebels.
Combat has been reported nationwide but the crucial strategic battles are being fought in an arc through western Syria, where most of the population lives.
Turkish Foreign Minister Ahmet Davutoglu met U.N. special envoy Lakhdar Brahimi, German Foreign Minister Guido Westerwelle and Libya's wartime rebel Prime Minister Mahmoud Jibril to discuss Syria on the sidelines of the Istanbul conference.
U.N. Secretary-General Ban Ki-moon said this week Brahimi would visit Syria soon to try to persuade Assad to call an immediate ceasefire.
The Syrian government dispatched warplanes to attack insurgent forces surrounding the Wadi-al-Dayf military barracks near Maarat al-Numan in Idlib province, wounding 22 rebels, the Syrian Observatory for Human Rights said.
The rebels captured Maarat al-Numan this week, cutting the main north-south highway linking Damascus, Homs and Aleppo, and government forces will need to retake it in order to reinforce and resupply Aleppo - Syria's largest city and commercial hub.
MEMORIES OF SREBRENICA
The U.N. Security Council, divided between Western powers on one side and Russia and China on the other, has proved helpless in halting a conflict which has spiralled into civil war and killed more than 30,000 people.
Erdogan said a system which allowed one or two nations to block intervention in such a grave humanitarian crisis was inherently unjust, and that Syria would go down in history as a U.N. failure much like Bosnia in the 1990s.
"How sad is that the United Nations is as helpless today as it was 20 years ago when it watched the massacre of hundreds of thousands of people in the Balkans, Bosnia and Srebrenica," Erdogan told the Istanbul conference.
The July 1995 massacre in Srebrenica was the worst on European soil since World War Two, in which Dutch U.N. peacekeepers abandoned what had been designated a U.N. safe haven to advancing Bosnian Serb forces, who then killed 8,000 Muslim men and boys and bulldozed their corpses into pits.
Turkish officials had expressed hope they might be able to persuade Moscow, which sold Syria $1 billion of arms last year, to soften its opposition at the Security Council and that if it succeeded, China would follow suit.
But relations between Ankara and Moscow sank to a new low on Wednesday after Turkey forced down a passenger jet flying from Moscow and publicly accused Russia of ferrying military equipment to Assad's forces.
Russia has said there were no weapons on the plane and that it was carrying a legal shipment of radar equipment.
Syria is banning Turkish civilian flights over its territory as of midnight on Saturday, according to a Syrian Foreign Ministry statement carried by state news agency SANA.
REBELS CONTROL BORDER TOWN, FOR NOW
Elsewhere on Syria's battlefronts on Saturday, government forces rained mortar fire down on the opposition-held Khalidiya neighbourhood of the city of Homs, the Observatory said. Explosions were felt throughout the besieged district.
To the south of Damascus near Deraa - cradle of the uprising which began with peaceful street rallies - Assad's troops and rebels were fighting on the edge of the town of Maarba.
After four days of heavy fighting in the town of Azmarin on the Turkish border, the rebels appeared to have a fragile hold.
"Praise be the town is now in our hands ... We have raised two flags inside the town and the battles are over. Azmarin is completely under our control," one resident, who did not want to be named, told Reuters by telephone from inside the town.
But a few km (miles) along the border clashes continued in the Syrian town of Darkush, where the crack of gunfire and sporadic sound of shelling could be heard from Turkey.
In a preliminary death toll across the country for Friday alone, the Observatory listed about 160 dead. Among them were a 3-year-old child killed in a bombardment of old Aleppo, a district whose ancient buildings have been severely damaged.
Tensions between Ankara and Damascus have also worsened. Turkey scrambled two fighter jets on Friday after a Syrian helicopter bombed Azmarin and has warned of a more forceful response if violence continue to spill over the border after a shell from Syria killed five Turkish civilians 10 days ago.
"If similar border violations occur again, and we feel that Turkey's national security is under threat, we will retaliate without hesitation," Davutoglu said.
Syria's state news agency SANA said Damascus was ready to accept a Russian proposal for a Syrian-Turkish joint security committee to try to contain the border violence. There was no confirmation of this from the Turkish side.