  The {\it Gaia} mission has provided the largest catalogue ever of sources
with tangential velocity information. However, using this catalogue for
dynamical studies is difficult because most of the stars lack line-of-sight
velocity measurements. Recently, we presented a selection of $\sim 10^7$ halo
stars with accurate distances that have been selected based on their photometry
and proper motions. Using this sample, we model the tail of the velocity
distribution with a power-law distribution, a commonly used approach first
established by \cite{Leonard1990THESPEED}. For the first time ever we use
tangential velocities measured accurately for an unprecedented number of halo
stars to estimate the escape velocity. In the solar neighbourhood, we obtain a
very precise estimate of the escape velocity which is $497^{+8}_{-8}~{\rm
km/s}$. This estimate is most likely biased low, our best guess is by 10\%. As
a result, the true escape velocity most likely is closer to $550~{\rm km/s}$.
The escape velocity directly constrains the total mass of the Milky Way. To
find the best fitting halo mass and concentration parameter we adjusted the
dark (spherical NFW) halo of a realistic Milky Way potential while keeping the
circular velocity at the solar radius fixed at $v_c(R_\odot) = 232.8~{\rm
km/s}$. The resulting halo parameters are $M_{200}^{+10\%} =
1.11^{+0.08}_{-0.07} \cdot10^{12} ~{\rm M}_\odot$ and concentration parameter
$c^{+10\%} = 11.8^{+0.3}_{-0.3}$, where we use the explicit notation to
indicate that these have been corrected for the 10\% bias. The slope of the
escape velocity with galactocentric distance is as expected in the inner Galaxy
based on Milky Way models. Curiously, we find a disagreement beyond the solar
radius which is likely an effect of a change in the shape of the velocity
distribution and could be related to the presence of velocity clumps.
