in 681, mahito was conferred the rank of , corresponding to the under the ritsuryō court rank system. with the establishment of the "yakusa no kabane" system in 684, he gained the title of "ason". in 689, he became vice-director of the dazaifu. he developed experience entertaining guests of honor from other countries. he took part in the planning of the taihō code alongside prince osakabe and fujiwara no fuhito, and in 701 was promoted to head of the ministry of popular affairs. mahito was also appointed as chief diplomat on a mission to tang china, receiving a ceremonial sword from emperor tenmu as a symbol of his command. this was the first example of such a sword being bestowed, and the action would be repeated for other emissaries to tang and for important generals.