We present the discovery of a highly irradiated and moderately inflated ultrahot Jupiter, TOI-1431b/MASCARA-5 b (HD201033b), 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{+/-}1.1m/s. A joint analysis of the TESS and ground-based photometry and radial velocity measurements reveals that TOI-1431b has a mass of M_p_=3.12{+/-}0.18M_J_ (990{+/-}60M{Earth}), an inflated radius of R_p_=1.49{+/-}0.05R_J_ (16.7{+/-}0.6R{Earth}), and an orbital period of P=2.650237{+/-}0.000003 days. Analysis of the spectral energy distribution of the host star reveals that the planet orbits a bright (V=8.049mag) and young (0.29_-0.19_^+0.32^Gyr) Am type star with T_eff_=7690_-250_^+400^K, resulting in a highly irradiated planet with an incident flux of =7.24_-0.64_^+0.68^x10^9^erg/s/cm (5300_-470_^+500^S{Earth}) and an equilibrium temperature of T_eq_=2370{+/-}70K. TESS photometry also reveals a secondary eclipse with a depth of 127_-5_^+4^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_day_=3004{+/-}64K and T_night_=2583{+/-}63K, the second hottest measured nightside temperature. The planet's low day/night temperature contrast (~420K) suggests very efficient heat transport between the dayside and nightside hemispheres. Given the host star brightness and estimated secondary eclipse depth of ~1000ppm in the K band, the secondary eclipse is potentially detectable at near-IR wavelengths with ground-based facilities, and the planet is ideal for intensive atmospheric characterization through transmission and emission spectroscopy from space missions such as the James Webb Space Telescope and the Atmospheric Remote-sensing Infrared Exoplanet Large-survey.