The city fell to the Arabs in AD 641, and a new capital of Egypt, Fustat, was founded on the Nile. After Alexandria's status as the country's capital ended, it fell into a long decline, which by the late Ottoman period, had seen it reduced to little more than a small fishing village. The French army under Napoleon captured the city in 1798 and the British soon captured it from the French, retaining Alexandria within their sphere of influence for 150 years. The city grew in the early 19th century under the industrialization program of Mohammad Ali, the viceroy of Egypt.