The new phase Mg7Pt4Ge4 (Mg81Pt4Ge4; = vacancy) was prepared by reacting a mixture of the correspondingelements at high temperatures. According to single crystal X-ray diffractiondata, it adopts a defect variant of the lighter analogue Mg2PtSi (Mg8Pt4Si4), reportedin the Li2CuAs structure. An ordering of the Mg vacanciesresults in a stoichiometric phase, Mg7Pt4Ge4. However, the high content of Mg vacancies results in a violationof the 18-valence electron rule, which appears to hold for Mg2PtSi. First principle density functional theory calculationson a hypothetical, vacancy-free Mg2PtGereveal potential electronic instabilities at E (F) in the band structure and significant occupancy of stateswith an antibonding character resulting from unfavorable Pt-Geinteractions. These antibonding interactions can be eliminated throughintroduction of Mg defects, which reduce the valence electron count,leaving the antibonding states empty. Mg itself does not participatein these interactions. Instead, the Mg contribution to the overallbonding comes from electron back-donation from the (Pt, Ge) anionicnetwork to Mg cations. These findings may help to understand how theinterplay of structural and electronic factors leads to the hydrogenpump effect observed in the closely related Mg3Pt, for which the electronic band structure shows a significant amountof unoccupied bonding states, indicating an electron deficient system. Electronic structure-driven vacancy orderingin Mg2-x PtGe (x = 1/4) generates a 2 x2 x 1 superstructure and triggers a relaxation of the defective3D diamond-type Mg framework.