  We present the curation and verification of a new combined optical and near
infrared dataset for cosmology and astrophysics, derived from the combination
of $ugri$-band imaging from the Kilo Degree Survey (KiDS) and $ZY\!J\!H\!K_{\rm
s}$-band imaging from the VISTA Kilo degree Infrared Galaxy (VIKING) survey.
This dataset is unrivaled in cosmological imaging surveys due to its
combination of area ($458$ deg$^2$ before masking), depth ($r\le25$), and
wavelength coverage ($ugriZY\!J\!H\!K_{\rm s}$). The combination of survey
depth, area, and (most importantly) wavelength coverage allows significant
reductions in systematic uncertainties (i.e. reductions of between 10 and 60\%
in bias, outlier rate, and scatter) in photometric-to-spectroscopic redshift
comparisons, compared to the optical-only case at photo-$z$ above $0.7$. The
complementarity between our optical and NIR surveys means that over $80\%$ of
our sources, across all photo-$z$, have significant detections (i.e. not upper
limits) in our $8$ reddest bands. We derive photometry, photo-$z$, and stellar
masses for all sources in the survey, and verify these data products against
existing spectroscopic galaxy samples. We demonstrate the fidelity of our
higher-level data products by constructing the survey stellar mass functions in
8 volume-complete redshift bins. We find that these photometrically derived
mass functions provide excellent agreement with previous mass evolution studies
derived using spectroscopic surveys. The primary data products presented in
this paper are publicly available at http://kids.strw.leidenuniv.nl/.
