Context.Aims. To understand the nature of transient obscuring outflows in active galactic nuclei, we use simultaneous multiwavelength observations with XMM-Newton, NuSTAR, the Hubble Space Telescope (HST), and the Max Planck Gesellschaft/European Southern Observatory (ESO) 2.2-m telescope triggered by soft X-ray absorption detected by Swift. Methods. We obtained ultraviolet spectra on 2016 December 12 and 21 using the Cosmic Origins Spectrograph (COS) on HST simultaneously with X-ray spectra obtained with XMM-Newton and NuSTAR. We modeled the ultraviolet spectra to measure the strength and variability of the absorption, and used photoionization models to obtain its physical characteristics. Results. We find new components of broad, blue-shifted absorption associated with Lyα, N v, Si iv, and C iv in our COS spectra. The absorption extends from velocities near zero in the rest-frame of the host galaxy to −6200 km s −1 . These features appear for the first time in NGC 3783 at the same time as heavy soft X-ray absorption seen in the XMM-Newton X-ray spectra. The X-ray absorption has a column density of ∼ 10 23 cm −2 , and it partially covers the X-ray continuum source. Combining the X-ray column densities with the UV spectral observations yields an ionization parameter for the obscuring gas of log ξ = 1.84 +0.4 −0.2 erg cm s −1 . Despite the high intensity of the UV continuum in NGC 3783, F(1470 Å)=8 × 10 −14 erg cm −2 s −1 Å −1 , the well known narrow UV absorption lines are deeper than in earlier observations in unobscured states, and low ionization states such as C iii appear, indicating that the narrow-line gas is more distant from the nucleus and is being shadowed by the gas producing the obscuration. Despite the high continuum flux levels in our observations of NGC 3783, moderate velocities in the UV broad line profiles have substantially diminished. Conclusions. We suggest that a collapse of the broad line region has led to the outburst and triggered the obscuring event.