We present a novel integer programming model for analyzing inter-terminal transportation (ITT) in new and expanding sea ports. ITT is the movement of containers between terminals (sea, rail or otherwise) within a port. ITT represents a significant source of delay for containers being transshipped, which costs ports money and affects a port’s reputation. Our model assists ports in analyzing the impact of new infrastructure, the placement of terminals, and ITT vehicle investments. We provide analysis of ITT at two ports, the port of Hamburg, Germany and the Maasvlakte 1 & 2 area of the port of Rotterdam, The Netherlands, in which we solve a vehicle flow combined with a multi-commodity container flow on a congestion based time–space graph to optimality. We introduce a two-step solution procedure that computes a relaxation of the overall ITT problem in order to find solutions faster. Our graph contains special structures to model the long term loading and unloading of vehicles, and our model is general enough to model a number of important real-world aspects of ITT, such as traffic congestion, penalized late container delivery, multiple ITT transportation modes, and port infrastructure modifications. We show that our model can scale to real-world sizes and provide ports with important information for their long term decision making.