Within the hydrodynamic modelling community, it is common practice to apply different modelling systems for coastal waters and river systems. Whereas for coastal waters 3D finite difference or finite element grids are commonly used, river systems are generally modelled using 1D networks. Each of these systems is tailored towards specific applications. Three-dimensional coastal water models are designed to model the horizontal and vertical variability in coastal waters and are less well suited for representing the complex geometry and crosssectional areas of river networks. On the other hand, 1D river network models are designed to accurately represent complex river network geometries and complex structures like weirs, barrages and dams. A disadvantage, however, is that they are unable to resolve complex spatial flow variability. In real life, however, coastal oceans and rivers interact. In deltaic estuaries, both tidal intrusion of seawater into the upstream river network and river discharge into open waters play a role. This is frequently approached by modelling the systems independently, with off-line coupling of the lateral boundary forcing. This implies that the river and the coastal model run sequentially, providing lateral discharge (1D) and water level (3D) forcing to each other without the possibility of direct feedback or interaction between these processes. An additional disadvantage is that due to the time aggregation usually applied to exchanged quantities, mass conservation is difficult to ensure. In this paper, we propose an approach that couples a 3D hydrodynamic modelling system for coastal waters (Delft3D) with a 1D modelling system for river hydraulics (SOBEK) online. This implies that contrary to off-line coupling, the hydrodynamic quantities are exchanged between the 1D and 3D domains during runtime to resolve the real-time exchange and interaction between the coastal waters and river network. This allows for accurate and mass conserving modelling of complex coastal waters and river network systems, whilst the advantages of both systems are maintained and used in an optimal and computationally efficient way. The coupled 1D-3D system is used to model the flows in the Pearl River Delta (Guangdong, China), which are determined by the interaction of the upstream network of the Pearl River and the open waters of the South China Sea. The highly complex upstream river network is modelled in 1D, simulating river discharges for the dry and wet monsoon periods. The 3D coastal model simulates the flow due to the external (ocean) periodic tidal forcing, the salinity distribution for both dry and wet seasons, as well as residual water levels (sea level anomalies) originating from the South China Sea. The model is calibrated and its performance extensively assessed against field measurements, resulting in a mean root mean square (RMS) error of below 6% for water levels over the entire Pearl River Delta. The model also represents both the discharge distribution over the river network and salinity transport p...