XG-PON is the latest ITU-T PON standard for passive optical networks (PONs), which provide broadband access to the end user at line rates of up to 10 Gb/s. The most important issue that is not strictly defined in the standard and is left to vendors to implement is the allocation of the shared upstream bandwidth. An efficient allocation mechanism must be applied on the upstream direction in order to assure acceptable packet latency and fairness among multiple subscribers. Within this context, we propose an XG-PON-oriented dynamic bandwidth allocation algorithm that implements a maxmin fair scheme to distribute the available upstream capacity to all the connected optical network units (ONUs) at the PON. Because frequent bandwidth granting and queue occupancy reporting account for low latency, our algorithm adopts a method in which every ONU is granted a portion of bandwidth at every downstream frame. The bandwidth grant is either calculated directly from the latest occupancy report or inferred from previous reports by means of traffic prediction. Our simulation results show that the proposed algorithm achieves fair bandwidth distribution among the ONUs along with low packet latency and latency jitter, irrespectively of the ONUs's spatial separation from the optical line terminal. Copyright