Senegal's recorded history dates from the 8th century, when it was part of the empire of Ghana. As this empire waned, the Djolof kingdom arose and flourished during the 13th and 14th centuries, in the area between the Senegal River and modern-day Dakar.
By the early 1500s, Portuguese traders had made contact with the coastal kingdoms, which was to last through the 16th century. They were displaced by the British, French and Dutch, who hoped to gain control of St-Louis and Île de Gorée and, strategic points where slaves bound for the Americas could be collected. St-Louis was finally secured by the French in 1659.
By the end of the 19th century, France controlled all of Senegal, and Dakar was built as the administrative centre. Senegal sent a deputy to the French parliament as early as 1848, but it wasn't until 1914 that the first African deputy, Blaise Diagne, was elected. He was followed by a new generation of black politicians led by Lamine Gueye and Léopold Senghor.
In the run-up to independence, Senegal joined French Sudan to form the Federation of Mali. The federation gained independence in 1960 but broke up two months later. Senegal became a republic under the presidency of Léopold Senghor.
At the end of 1980, Senghor stepped down as president. His place was taken by Abdou Diouf, whose first major crisis occurred in 1984 when it was discovered that an estimated 700,000 tonnes of groundnuts (about three times the official exported amount) had been smuggled into neighbouring countries by peasants unhappy with the fixed payments they received from the government.
In 1989, a minor incident on the Senegal-Mauritania border led to serious riots in both countries in which many people died. Both countries deported thousands of the other's nationals (killing hundreds in the process), the border was closed and diplomatic relations were broken off until April 1992.
In the early 1990s, there were serious clashes in the Casamance region between the army and separatist rebels. Quite apart from the suffering caused to the local people, the fighting severely affected Senegal's tourist industry. This compounded Senegal's already desperate financial situation.
More violence occurred in Casamance and elsewhere in early 1993, following elections in which Diouf was elected president for a third term. After long negotiations, a cease-fire was declared in July that year, and in the following months peace returned to Casamance. By early 1994, the first tourists had also begun to return.
Meanwhile, in other parts of the country, things were still far from peaceful. The government introduced a number of austerity measures, leading to a one-day general strike in early September and sporadic outbreaks of unrest in Dakar and other cities during the following months. The devaluation of the CFA in January 1994 also resulted in angry demonstrations. In February 1994, hundreds of people marched on Dakar's presidential palace and six policemen on guard were reportedly hacked to death. The government responded to this by ordering high-profile army patrols onto the streets of the capital. The popular opposition leader Abdou-laye Wade was arrested and accused of conspiracy.
Dakar remained tense but peaceful in the following months, and Wade was released in May 1994. The March 2000 presidential elections were a close contest between President Abdou Diouf and Abdoulaye Wade. After a tense second round of voting, Wade emerged victorious and is now Senegal's new president. International observers declared the elections free and fair and it was refreshing to see a long-time African leader (Diouf) peacefully relinquish power at the will of the people. President Wade has promised an open, transparent government and hopes are high that he will tackle Senegal's many problems with a renewed vigour. On the down side there was more violence in the Casamance region during this time, with clashes between government troops and a faction of the separatist rebels from the Movement for Democratic Forces of Casamance (MFDC). The government is maintaining a large army presence in the region.