Pasaia is mentioned in documentary records for the first time in 1203 as Oiarso. The name of the village was later changed to "Pasage", which means 'port' in Gascon. The Gascons had come to inhabit the area side by side with the Basque people at the beginning of the 13th century. The current name is first attested in the 15th century, when it was called the above "Pasage".
It was a major source of revenue for the municipal coffers on the strength of its strategic position in the commercial searoutes. It was the Guipuzcoana Company's main port, numbering up to seven shipyards in the mid-17th century. Historically the area was controlled by two competing baronies, that of Hondarribia, who controlled the Donibane district, and Donostia, who controlled the San Pedro district. Donibane was detached from the Hondarribia barony in 1770, while San Pedro was separated from the Donostia barony in 1805, at the expense of San Sebastián. The Antxo district was formed in 1890, when the Irun-Madrid railway came through. Trintxerpe, next to San Pedro, was the last district to be formed. Trintxerpe and Antxo actually form a continuous urban strip with the eastern districts of the city of Donostia.