The ancient port of Jaffa changed hands many times in the course of history. Archeological excavations from 1955 to 1974 unearthed towers and gates from the Middle Bronze Age. Subsequent excavations, from 1997 onwards, helped date earlier discoveries. They also exposed sections of a packed-sandstone glacis and a "massive brick wall", dating from the Late Bronze Age as well as a temple "attributed to the Sea Peoples" and dwellings from the Iron Age. Remnants of buildings from the Persian, Hellenistic and Pharaonic periods were also discovered.
The city is first mentioned in letters from 1470 BCE that record its conquest by Egyptian Pharaoh Thutmose III. Jaffa is mentioned several times in the Bible, as the port from which Jonah set sail for Tarshish; as bordering on the territory of the Tribe of Dan; and as the port at which the wood for Solomon's Temple in Jerusalem arrived from Lebanon. According to some sources it has been a port for at least 4,000 years.
In 1099, the Christian armies of the First Crusade, led by Godfrey of Bouillon occupied Jaffa, which had been abandoned by the Muslims, fortified the town and improved its harbor. As the County of Jaffa, the town soon became important as the main sea supply route for the Kingdom of Jerusalem. Jaffa was captured by Saladin in 1192 but swiftly re-taken by Richard Coeur de Lion, who added to its defenses. In 1223, Emperor Frederick II added further fortications. Crusader domination ended in 1268, when the Mamluk Sultan Baibars captured the town, destroyed its harbor and razed its fortifications. In 1336, when a new Crusade was being planned, Al-Nasir Muhammad had the harbor destroyed to prevent the Franks from landing there. For the same reason, both the town and the harbor were destroyed in 1345. In the 16th century, Jaffa was conquered by the Ottomans and was administered as a village in the Sanjak of Gaza.
Napoleon besieged the city in 1799 and killed scores of inhabitants; a plague epidemic followed, decimating the remaining population. The surrendering garrison of several thousand Muslims was massacred.
Jaffa began to grow as an urban center in the early 18th century, when the Ottoman government in Istanbul intervened to guard the port and reduce attacks by Bedouins and pirates. However, the real expansion came during the 19th century, when the population grew from 2,500 in 1806 to 17,000 in 1886.
From 1800 to 1870, Jaffa was surrounded by walls and towers, which were torn down to allow for expansion as security improved. The sea wall, 2.5 metres (8.2 ft) high, remained intact until the 1930s, when it was built over during a renovation of the port by the British Mandatory authorities. During the mid-19th century, the city grew prosperous from trade, especially of silk and Jaffa oranges, with Europe. In the 1860s Jaffa's small Sephardic community was joined by Jews from Morocco and small numbers of European Ashkenazi Jews, making by 1882 a total Jewish population of more than 1,500.
The first Jews to build outside of Jaffa, in the area of modern day Tel Aviv, were Yemenite Jews. These homes, built in 1881, became the core of Kerem HaTeimanim (Hebrew for "the Vineyard of the Yemenites"). In 1896 the Yemenite Jews established Mahane Yehuda, and in 1904, Mahane Yossef. These neighbourhoods later became the Shabazi neighbourhood.
During the 1880s, Ashkenazi immigration to Jaffa increased with the onset of the First Aliyah. The new arrivals were motivated more by Zionism than religion and came to farm the land and engage in productive labor. In keeping with their pioneer ideology, some chose to settle in the sand dunes north of Jaffa.[9] The beginning of modern-day Tel Aviv is marked by the construction of Neve Tzedek, a neighborhood built by Ashkenazi settlers between 1887 and 1896.