Since no-one posted a question for a long time, I'll post one:
Peter the Great wanted to conquer this fortress to allow him to create a navy. At first he failed, but later succedeed. But then after a lost war, the fortress was given back to the enemy. In a following war, it was recaptured, and Peter could start building his fleet.
What is the name of the fortress?
(this is probably pretty easy, but I couldn't come with a harder one)