The Fort of Ponta da Bandeira (Forte da Ponta da Bandeira), also known as Pau da Bandeira Fort (Flag's Mast Fort); Fort of Nossa Senhora da Penha de França (Our Lady of the Penha de França Fort); the Fort of Registo (Registry fort); or the Fort of Lagos is situated in the city of Lagos, in the Faro District of Portugal. It was built in the 17th century, as one of the main components of a system of maritime fortifications to defend the city, then headquarters of the military government of the Algarve. Significant restoration work has been carried out over the years and the fort is considered to be one of the best-preserved 17th century fortifications in the Algarve region. Description The Fort is located at the point where the Bensafrim River meets the Atlantic Ocean. This position was of great strategic importance, being close to the walls of the city but with easy access to the sea. In this way it could protect both access to the quays along the banks of the river and the south-eastern and eastern sides of the walls, and allow crossfire with the bastions of Lagos Castle and the city gates. At the time of its construction it was considered one of the most advanced in the Algarve region. It was planned for artillery battles, with a regular square-shaped layout, with thick walls on the sides facing the ocean. Access to the upper terrace is via a ramp. The building was partially surrounded by a moat, having only one entrance, which was accessed through a drawbridge. Above the entrance is a stone coat of arms, and a stone plaque indicating that construction was started by the Count of Sarzedas and completed by the Marquis of Nisa. It has several cylindrical sentry-boxes, which were not part of the original structure. Inside there are now several rooms for exhibitions, a restaurant and a small chapel, completely covered with tiles and dedicated to Saint Barbara. Construction After the beginning of the Restoration War in the 17th century, which pitted Portugal against Spain, there was a change in the Portuguese military strategy, with greater attention being paid to land defence on the Spanish border. Along the coast only batteries were installed, with functions more linked to surveillance than defence. This approach resulted from the poor state of the Spanish fleet and the signing of a peace agreement