ISTANBUL — In a sign of escalating frustration in Turkey after days of cross-border shelling with Syria, Prime Minister Recep Tayyip Erdogan lashed out at the United Nations’ inaction in Syria with some of his strongest comments yet, saying world powers are repeating the mistakes they made in Bosnia in the 1990s.

“This negligence 20 years ago was explained by the international community being caught unprepared in dealing with the issues of the post-cold-war era,” Mr. Erdogan said at an international conference in Istanbul. “Well, how can the injustice and weakness displayed in the Syrian issue be explained today?”

He also called for a change in the structure of the Security Council, where reluctance by any member — in this case, China and Russia — can stymie action.

Tensions between Turkey and Syria, a former ally, have been rising for months, as Turkey has sheltered leaders of the armed opposition to the government of President Bashar al-Assad, and refugees from the fighting. But the bad feelings have intensified in recent days as shells from Syria began landing in Turkey, prompting retaliation, and as Turkish officials said they found Russian munitions on a Moscow-to-Damascus civilian jet they forced to land for an inspection.