The advent of the Internet of Things (IoT) is boosting a wide range of new multimedia applications driven by an ecosystems of "smart" and highly heterogeneous devices. This introduces new challenges for industries and network operators in the design of next-to-come fifth generation (5G) wireless systems, where stringent performance requirements in terms of high data rate, improved reliability, and ultra-low latency are to be met. A viable way of development is the integration of local clouds at the edge of the network as part of the recent Edge Computing paradigm. However, poor channel conditions experienced by the devices towards the serving edge node may impede the effectiveness of managing mission-critical IoT applications. In this context, Device-to-Device (D2D) communications represent a key enabling technology, which offers decisive benefits for future mobile 5G scenarios. As proposed in this paper, edgebased IoT applications may rely on D2D transmissions between the IoT devices also in the presence of mobility. In particular, a forwarding scheme is proposed showing that whenever collaborating IoT devices fall under the coverage of neighboring cellular edge nodes, D2D communications can guarantee a significant reduction in delay and traffic load across the network. The proposed solution is validated through simulations that indicate significant improvements in terms of latency, percentage of served tasks, energy efficiency, and traffic load w.r.t. the case where all communications are forwarded over the edge nodes. © VDE VERLAG GMBH · Berlin · Offenbach.