  We present the discovery of a highly irradiated and moderately inflated
ultra-hot Jupiter, TOI-1431b/MASCARA-5b (HD 201033b), first detected by NASA's
Transiting Exoplanet Survey Satellite mission (TESS) and the Multi-site All-Sky
CAmeRA (MASCARA). The signal was established to be of planetary origin through
radial velocity measurements obtained using SONG, SOPHIE, FIES, NRES, and
EXPRES, which show a reflex motion of $K=294.1\pm1.1$ m s$^{-1}$. A joint
analysis of TESS, MuSCAT2, and LCOGT photometry, radial velocity measurements,
and the spectral energy distribution of the host star reveals that TOI-1431b
has a mass of $M_{p}=3.14_{-0.18}^{+0.19}$ $\rm{M_J}$ ($1000\pm60$
M$_{\oplus}$), an inflated radius of $R_{p}=1.51\pm0.06$ $\rm{R_J}$
($16.9_{-0.6}^{+0.7}$ R$_{\oplus}$), and an orbital period of
$P=2.65022\pm0.00001$ d. The planet orbits a bright ($\mathrm{V}=8.049$ mag)
and young ($0.29^{+0.32}_{-0.19}$ Gyr) Am type star with $T_{\rm
eff}=7690^{+400}_{-250}$ $\rm{K}$, resulting in a highly irradiated planet with
an incident flux of $\langle F \rangle=7.24^{+0.68}_{-0.64}\times$10$^9$ erg
s$^{-1}$ cm$^{-2}$ ($5300^{+500}_{-470}\mathrm{S_{\oplus}}$) and an equilibrium
temperature of $T_{eq}=2370\pm100$ K. TESS photometry also reveals a secondary
eclipse with a depth of $124\pm5$ppm as well as the full phase curve of the
planet's thermal emission in the red-optical. This has allowed us to measure
the dayside and nightside temperature of its atmosphere as
$T_\mathrm{day}=2983^{+63}_{-68}$ K and $T_\mathrm{night}=2556^{+62}_{-65}$ K,
the second hottest measured nightside temperature. The planet's low day/night
temperature contrast ($\sim$400 K) suggests very efficient heat transport
between the dayside and nightside hemispheres.
