  The mass of the top quark is a fundamental parameter of the Standard Model
and has to be determined experimentally. In these proceedings, I review recent
direct measurements of the top quark mass in $p\bar p$ collisions at $\sqrt
s=1.96$ TeV recorded by the D0 experiment at the Tevatron. The measurements are
performed in final states containing one and two charged leptons. I will
present the legacy combination of all top quark mass measurements from the D0
experiment and their combination with results from the CDF experiment. A
relative precision of down to 0.3\% is attained.
