To constrain the ternary K2CO3-CaCO3-MgCO3 T-X diagram at 6 GPa and to expand upon the known K-Mg, K-Ca, and Ca-Mg binary systems we have carried out multi-anvil experiments along the K2CO3-Ca0.5Mg0.5CO3 join. The diagram has primary phase fields for K2CO3, K2Mg(CO3)2, K2Ca0.1-0.5 Mg0.9-0.5(CO3)2, K4CaMg(CO3)4, Ca-magnesite, and dolomite. The system has two liquidus minima near 1000 °C. At one minimum, a liquid with the composition of 36 K2CO3·64(Ca0.65Mg0.35)CO3 is in equilibrium with three phases: Ca-magnesite, K2Ca0.1-0.5Mg0.9-0.5(CO3)2, and K6Ca2(CO3)5. The other minimum, a liquid with the composition of 62 K2CO3·38Ca0.72Mg0.28CO3 is in equilibrium with K2CO3, K4CaMg(CO3)4, and K6Ca2(CO3)5. At 900 °C, the ternary diagram contains two- and three-phase regions with Ca-magnesite, aragonite, K2Ca3(CO3)4, K2Ca(CO3)2, K6Ca2(CO3)5, K2CO3, K2Ca0.1-0.5Mg0.9-0.5(CO3)2 solid solution, K2Mg0.9Ca0.1(CO3)2, and K4CaMg(CO3)4. We also expect an existence of primary phase fields for K6Ca2(CO3)5, K2Ca3(CO3)4 and aragonite. We suggest that extraction of K from silicate to carbonate components should decrease the minimum melting temperature of dry carbonated mantle rocks up to 1000 °C at 6 GPa and yield ultrapotassic Ca-rich dolomite melt containing more than 10 mol% K2CO3. As temperature increases above 1200 °C the melt evolves toward an alkali-poor, dolomitic liquid if the bulk molar CaO/MgO ratio >1, or toward K-Mg-rich carbonatite if bulk CaO/MgO <1. The majority of compositions of carbonatite inclusions in diamonds from around the world fall within the magnesite primary field between the 1300 and 1400 °C isotherms. These melts could be formed by partial melting of magnesite-bearing peridotite or eclogite with bulk Ca/Mg <1 at temperatures ≤1400 °C. A few compositions revealed in the Ebelyakh and Udachnaya diamonds (Yakutia) fall within the dolomite primary field close to the 1200 °C isotherm. These melts could be formed by partial melting of dolomite-bearing rocks, such as carbonated pelite or eclogite with bulk Ca/Mg <1 at temperatures ≤1200 °C.