Yes this was a bit earlier, in the late 14th Century, but IIRC both Rostock, Wismar and Stettin, under pressure from the Dukes of Mecklenburg, made themselves open ports to the Victual Brothers. They basically became supply and logistics bases for the Victual Brothers in a privateering / piratical war against Denmark, and also the Hanse. The Hanse having already defeated Denmark in the first Danish-Hanseatic war had made peace and was trying to resume normal commerce in the Baltic, but the Pomeranian and Mecklenburg dukes still had a beef with the princely family that ruled Denmark (which had familial links to Pomerania) and so they wanted to continue the war, and their cities complied with this.
So not only do you have these open pirate cities but the rather odd situation where Lübeck and some of the other Hanse towns were skirmishing with Stettin, Wismar and Rostock in the Baltic and around the coastlines of Denmark and Sweden. I think Lübeck actually raided Stettin at one point and burnt their harbor.
Another interesting place to look at is Bergen in Norway, which was an unhappy place where the Hanse was taking advantage of the ‘food insecurity’ of the locals and the town itself seems to have not been adequately defended, so the Victual Brothers sacked it something like 6 times. Bergen was allegedly the inspiration for the “Pirate Jenny” song by Bertold Brecht in the Threepenny opera.
I’ll look for some links on the pirate-town alliances. It is mentioned in the English Wiki on the Victual Brothers here: https://en.wikipedia.org/wiki/Victual_Brothers#History_of_the_Guild
Thanks for the tip on the article looking forward to reading that one.