The Portuguese, English and French all constructed forts in the city to protect their interests in slaving. Portuguese reached the town they called Ajudá in 1580 and the Portuguese Fort of São João Baptista de Ajudá, now housing a museum, dates from 1721 and remained with Portugal until 1961.
The Market Center of Ouidah, which was established by Scouts more than 20 years ago, trains young people in agricultural skills, thus helping to reverse the exodus towards the cities.
In 1680 the Portuguese governor of São Tomé and Príncipe was authorised to erect a fort. In 1721, after having been abandoned for some years, it was reconstructed and named São João Baptista de Ajudá.
The fort had an important impact in Benin, greatly contributing to the Portuguese slave trade. Its importance is attested by the fact that the Portuguese language was the only foreign language that the Kings of Dahomey authorised. Portuguese descendants were also important in the political structure of the kingdom and some established Portuguese-Brazilian families, such as the Sousa, whose descendants still exist in Benin, were powerful and abided by private law. In January 1722 the pirate Bartholomew Roberts ("Black Bart") sailed into the harbour and captured all the eleven ships at anchor there.
Following the abolition of the legal slave trade in 1807, the fort, which had before been one of the major slave ports, gradually lost its importance and although Portugal continued to claim it as one of its possessions, formal occupation and administration were abandoned on several occasions. It was only when French presence in the region started threatening Portugal’s interests that the settlement was again permanently manned. This didn't of course prevent the French conquest of Dahomey (1891-1894) and São João Baptista de Ajudá - now reduced to the territory actually within the walls of the fort - lost what remained of its importance.
The fort was reoccupied by Portugal in 1865. In this period it served as a base for a brief Portuguese attempt to impose a protectorate on the Kingdom of Dahomey of which the city of Hweda (Ajudá - Ouidah) was part (1885-1887).
Until its annexation by Dahomey in 1961, São João Baptista de Ajudá was probably the smallest recognized separate modern political unit: according to the census of 1921 it had 5 inhabitants and, at the moment of the ultimatum by the Dahomey Government, it had only 2 inhabitants representing Portuguese Sovereignty who tried to burn it rather than surrendering it.
Only in 1975 did the annexation of the fort by Dahomey (now renamed Benin) gain Portuguese recognition, followed by its restoration paid for by Portugal. The fort is a small square with towers at the four corners. It comprises a church and officers' quarters. The Fort of São João Baptista de Ajudá now houses a museum.
Bruce Chatwin’s book The Viceroy of Ouidah (1980) is a fictional retelling of the life of Francisco Félix de Sousa, the Sousa family founder in Benin and that of his powerful local descendants, dealing also with the subject of slave trade with Brazil.