After the failure of the campaign of Nubia in the south Amr bin Al-Aas decided to undertake campaigns in the west. Some time in September 642, Amr led his troops to the west. After one month of marching the Muslim forces reached the city of Pentapolis. The country was nominally under the suzerainty of the Byzantines, but they had made no arrangements for the defence of the city. The Muslims accordingly occupied it without any resistance. The citizens sued for peace, and Amr gave them peace on the usual terms. A peace pact was drawn up "hereunder the people agreed to pay Jizya. Two unusual conditions were at the instance of the people inserted in the treaty. The first was that in lieu of Jizya, it was open to the citizens to sell their children. The second was that no tax collector was to enter the city; they would themselves pay the Jizya at the appointed time. Amr stayed in the city for some time to reorganise the administration. The Muslims renamed the city of Pentapolis as Burqa.
From Burqa, Uqba bin Nafe was sent at the head of a column to undertake a campaign against Fezzan. Uqba marched to Zaweela the capital of Fezzan. No resistance was offered, and the entire district of Fezzan submitted to the Muslims. They agreed to pay Jizya, but they got a clause inserted in the treaty to the effect that a part of the Jizya coming in from the district was to be spent for the relief of the poor of the area.
After the conquest of Fezzan, Uqba relurned to Burqa, Soon after the Muslim army marched westward from Burqa. They arrived at Tripoli in the spring of 643 A.D. there was a Byzantine garrison here and they refused to surrender. The Muslims accordingly laid siege to the city. Amr put his camp on a high ground and blocked all land routes to the city. The city however had free access to the sea, and the passage to the sea could not be blocked by the Muslims.
The Muslim army did not have siege equipment with them. The Byzantine garrison remained locked up within the fortifications and did not come out into the open. The siege accordingly dragged on for two months. One day a party of the Muslims accidentally discovered the passage that provided the city access to the sea. This party rushed into the city through this passage raising the shouts of 'Allah-o-Akbar.' The Byzantine garrison thought that the entire Muslim army had entered the city. There was panic in the city, and the Byzantine garrison sought refuge on board the ships that lay anchored in the harbour.
Hearing the shouts of 'Allah-o-Akbar' from inside the city, the Muslim army pressed the attack from outside, and after having scaled the walls got into the city. The Byzantine garrison fled to the ships and sailed away. The Muslims captured the city without resistance. The citizens surrendered on the usual terms.
From Tripoli, Amr sent a column to Sabrata a city forty miles from Tripoli. A feeble resistance was put up, and thereafter the city surrendered and agreed to pay Jizya.
From Tripoli Amr bin Al-Aas wrote to the Caliph, "We have conquered Burqa, Tripoli and Sabrata. The way to the west is clear, and if the Commander of the Faithful wishes to conquer more lands, we could do so wilh the grace of God."
Umar replied, "It is not Afriqa, it is Mafriqa. Any further advance would be divisive and treacherous, Consolidate your position in Egypt, and there should be no further campaigning."
Amr bin Al-Aas accordingly abandoned Tripoli and Burqa and returned to Fustat This was towards the close of the year 643 A.D.