For many Arabs, Turkey's surrender in Libya was a betrayal of Muslim interests to the infidels. The 1912 Treaty of Lausanne was meaningless to the beduin tribesmen who continued their war against the Italians, in some areas with the aid of Turkish troops left behind in the withdrawal. Fighting in Cyrenaica was conducted by Sanusi units under Ahmad ash Sharif, whose followers in Fezzan and southern Tripolitania prevented Italian consolidation in those areas as well. Lacking the unity imposed by the Sanusis, resistance in northern Tripolitania was isolated, and tribal rivalries made it less effective. Urban nationalists in Tripoli theorized about the possibility of establishing a Tripolitanian republic, perhaps associated with Italy, while Suleiman Baruni, a Berber and a former member of the Turkish parliament, proclaimed an independent but short-lived Berber state in the Gharyan region. For the beduins, however, unencumbered by any sense of nationhood, the purpose of the struggle against the colonial power was defending Islam and the free life they had always enjoyed in their tribal territory.
In 1914 the Sanusis counterattacked in Fezzan, quickly wiping out recent Italian gains there, and in April 1915 they inflicted heavy casualties on an Italian column at Qasr Bu Hadi in the Sirtica. Captured rifles, artillery, and munitions fueled a subsequent Sanusi strike into Tripolitania, but the success of the campaign was compromised by the traditional hostility that existed between the beduins and the nationalists.
When Italy joined the Allied Powers in 1915, the first ItaloSanusi war (1914-17) in Cyrenaica became part of the world war. Germany and Turkey sent arms and advisers to Ahmad, who aligned the Sanusis with the Central Powers with the objective of tying down Italian and British troops in North Africa. In 1916, however, Turkish officers led the Sanusis on a campaign into Egypt, where they were routed by British forces. Ahmad gave up Sanusi political and military leadership to Idris and fled to Turkey aboard a German submarine. The pro-British Idris opened negotiations with the Allies on behalf of Cyrenaica in 1917. The result was, in effect, a truce rather than a conclusive peace treaty, for neither the Italians nor the Sanusis fully surrendered their claims and control in the region. Britain and Italy recognized Idris as amir of interior Cyrenaica, with the condition that Sanusi attacks on coastal towns and into Egypt cease. Further consideration of Cyrenaica's status was deferred until after the war.