The first observation of $Z$ boson production in proton-lead collisions at a centre-of-mass energy per proton-nucleon pair of $\sqrt{s_{NN}}=5~\text{TeV}$ is presented. The data sample corresponds to an integrated luminosity of $1.6~\text{nb}^{-1}$ collected with the LHCb detector. The $Z$ candidates are reconstructed from pairs of oppositely charged muons with pseudorapidities between 2.0 and 4.5 and transverse momenta above $20~\text{GeV}/c$. The invariant dimuon mass is restricted to the range $60-120~\text{GeV}/c^2$. The $Z$ production cross-section is measured to be \begin{eqnarray*} \sigma_{Z\to\mu^+\mu^-}(\text{fwd})&=&13.5^{+5.4}_{-4.0}\text{(stat.)}\pm1.2\text{(syst.)}~\text{nb} \end{eqnarray*} in the direction of the proton beam and \begin{eqnarray*} \sigma_{Z\to\mu^+\mu^-}(\text{bwd}) & =&10.7^{+8.4}_{-5.1}\text{(stat.)}\pm1.0\text{(syst.)}~\text{nb} \end{eqnarray*} in the direction of the lead beam, where the first uncertainty is statistical and the second systematic.
The production of $J/\psi$ mesons with rapidity $1.5<y<4.0$ or $-5.0<y<-2.5$ and transverse momentum $p_\mathrm{T}<14 \mathrm{GeV}/c$ is studied with the LHCb detector in proton-lead collisions at a nucleon-nucleon centre-of-mass energy $\sqrt{s_{NN}}=5 \mathrm{TeV}$. The analysis is based on a data sample corresponding to an integrated luminosity of about $1.6 \mathrm{nb}^{-1}$. For the first time the nuclear modification factor and forward-backward production ratio are determined separately for prompt $J/\psi$ mesons and $J/\psi$ from $b$-hadron decays. Clear suppression of prompt $J/\psi$ production with respect to proton-proton collisions at large rapidity is observed, while the production of $J/\psi$ from $b$-hadron decays is less suppressed. These results show good agreement with available theoretical predictions. The measurement shows that cold nuclear matter effects are important for interpretations of the related quark-gluon plasma signatures in heavy-ion collisions.