A measurement is presented of the cross section for electroweak production of a Z boson and a photon in association with two jets (Z gamma jj) in proton-proton collisions. The Z boson candidates are selected through their decay into a pair of electrons or muons. The process of interest, electroweak Z gamma jj production, is isolated by selecting events with a large dijet mass and a large pseudorapidity gap between the two jets. The measurement is based on data collected at the CMS experiment at root s = 13 TeV, corresponding to an integrated luminosity of 35.9 fb(-1). The observed significance of the signal is 3.9 standard deviations, where a significance of 5.2 standard deviations is expected in the standard model. These results are combined with published results by CMS at root s = 8 TeV, which leads to observed and expected respective significances of 4.7 and 5.5 standard deviations. From the 13 TeV data, a value is obtained for the signal strength of electroweak Z gamma jj production and bounds are given on quartic vector boson interactions in the framework of dimension-eight effective field theory operators.