Comprehensive studies on the impact of market access on port efficiency are scarce, and the problem that market access indicators are potentially endogenous lacks treatment in maritime economics. This paper offers both theoretical and empirical advances to fill these research gaps. First, it pioneers in the use of Stochastic semi-Nonparametric Envelopment of Z variables Data for measuring port efficiency, and further develops the methodology for panel data and proposes an instrumental variable extension for dealing with endogenous market access indicators. Second, it advances the empirical port literature by developing a unique panel dataset on Norwegian container ports encompassing a comprehensive set of foreland and hinterland connectivity measures. Our comprehensive assessment suggests that the role of market access in determining port efficiency is uncertain.