In low-voltage grids with a wide spread of domestic and/or small commercial consumers, mostly single-phase, problems can appear due to unbalanced power consumption between the different phases. These problems are mainly caused due to voltage unbalances between phases and the increase in distribution losses. This phenomenon occurs more frequently at the end of highly radial grids and can be stressed by the installation of renewable generators next to the consumers. Amongst the various techniques that have been proposed to solve this problem, this article explores the use of a D-STATCOM, presenting and testing a new method for the optimal location of this type of D-FACT. The developed method starts from a detailed analysis of the existing voltage unbalances in a distribution network and identifies the optimal location of the D-STATCOM (i.e., the one that reduces these unbalances while reducing energy losses). The developed method has been successfully tested for one year at four real European locations with different characteristics and different kinds of users.