Optical and near-infrared (NIR) spectra are presented for ULAS J131911.29+095951.4 (hereafter ULAS J1319+0950), a new redshift z = 6.127 +/- 0.004 quasar discovered in the Third Data Release (DR3) of the UKIRT Infrared Deep Sky Survey (UKIDSS). The source has Y_Vega = 19.10 +/- 0.03, corresponding to M_1450,AB = -27.12, which is comparable to the absolute magnitudes of the z ~= 6 quasars discovered in the SDSS. ULAS J1319+0950 was, in fact, registered by SDSS as a faint source with z_AB = 20.1 +/- 0.1, just below the signal--to--noise ratio limit of the SDSS high-redshift quasar survey. The faint z-band magnitude is a consequence of the weak Ly alpha/N V emission line, which has a rest-frame equivalent width of only ~20 A and provides only a small boost to the z-band flux. Nevertheless, there is no evidence from this UKIDSS-based search for a significant population of high-redshift quasars with weak emission lines. The Ly alpha optical depth to ULAS J1319+0950 is consistent with that measured towards similarly distant SDSS quasars, implying that results from optical- and NIR-selected quasars may be combined. Also presented is a new NIR-spectrum of the previously discovered UKIDSS quasar ULAS J020332.38+001229.2, which reveals the object to be a broad absorption line quasar. The new spectrum shows that the emission line previously identified as Ly alpha is actually N V, leading to a revised redshift of z = 5.72, rather than z = 5.86 as previously estimated.