The Yuan Empire was Mongol in nature but one of it’s main domains was China. Along with that, since the main religion of the region was Buddhism with it’s texts written in variants of Sanskrit, it became mandatory for the Mongols to create a bridge between the three languages. It was developed during the reign of Kublai Khan by a Tibetian monk Phags-pa. Basically, it’s an extension of Tibetian Script to include characters of Mongol and Chinese. Of the three scripts, the Tibetan form is the most interesting. If we look at it carefully, it is the chopped upper part of the seal script.
Note that similar to Tibetan, the ta sequence is mirrored for the harder one.
Om Mani Padme Ham in Phagspa, Phagspa Seal Script & Tibetan