Great Coastal Gate and Fat Margaret's Tower were built to protect the city from the seaside, but also to impress quests arriving by sea. The Great Coastal Gate (built at the same time with the city wall) is located in the northern part of the Old Town of Tallinn near the port. In the 16th century, during the reconstruction of the gate, the Fat Margaret's artillery tower was built nearby.
Today, the Fat Margaret houses Estonian Maritime Museum. The Museum exhibits a remarkable collection of ship models from different eras. The viewing platform on the roof of the tower offers a view over the Old Town and the Bay of Tallinn. In the summer, the only rooftop café in the Tallinn Old Town is open there.
Walking up from the port this is the first part of the old town encountered and would have provided protection for the old town.
The level of preservation of the city walls and towers is really something. I suppose since the city grew in different directions, they never needed to tear it all down as has happened elsewhere...
This tower is a little hard to see from inside the old town, and you have to pay for the maritime museum to see it and go up in it. Worth it if you have the time.