In the Middle Ages , it was instead an important port of the Republic of Pisa .
In the Middle Ages , it was an important port of Pisa 's Republic .