Wexford lies on the south side of Wexford Harbour, the estuary of the River Slaney. According to a local legend, the town got its Irish name, Loch Garman, from a young man named Garman Garbh who was drowned on the mudflats at the mouth of the River Slaney by flood waters released by an enchantress. The resulting loch or lough was thus named, Loch Garman. The town was founded by the Vikings in about 800 AD. They named it Veisafjǫrðr, inlet of the mud flats and the name has changed only slightly into its present form. For about three hundred years it was a Viking town, a city state, largely independent and owing only token dues to the Irish kings of Leinster.