We present the spectroscopic analysis of a large sample of late-M, L, and T dwarfs from the United Kingdom Deep Infrared Sky Survey. Using the YJHK photometry from the Large Area Survey and the red-optical photometry from the Sloan Digital Sky Survey we selected a sample of 262 brown dwarf candidates and we have followed-up 196 of them using the echelle spectrograph X-shooter on the Very Large Telescope. The large wavelength coverage (0.30 − 2.48µm) and moderate resolution (R∼ 5000 − 9000) of X-shooter allowed us to identify peculiar objects including 22 blue L dwarfs, 2 blue T dwarfs, and 2 low gravity M dwarfs. Using a spectral indices-based technique we identified 27 unresolved binary candidates, for which we have determined the spectral type of the potential components via spectral deconvolution. The spectra allowed us to measure the equivalent width of the prominent absorption features and to compare them to atmospheric models. Cross-correlating the spectra with a radial velocity standard, we measured the radial velocity for our targets, and we determined the distribution of the sample, which is centred at -1.7±1.2 km s −1 with a dispersion of 31.5 km s −1 . Using our results we estimated the space density of field brown dwarfs and compared it with the results of numerical simulations. Depending on the binary fraction, we found that there are (0.85±0.55)×10 −3 to (1.00±0.64)×10 −3 objects per cubic parsec in the L4-L6.5 range, (0.73 ± 0.47) × 10 −3 to (0.85 ± 0.55) × 10 −3 objects per cubic parsec in the L7-T0.5 range, and (0.74 ± 0.48) × 10 −3 to (0.88 ± 0.56) × 10 −3objects per cubic parsec in the T1-T4.5 range. We notice that there seem to be an excess of objects in the L to T transition with respect to the late T dwarfs, a discrepancy that could be explained assuming a higher binary fraction than expected for the L to T transition, or that objects in the high-mass end and low-mass end of this regime form in different environments, i.e. following different Initial Mass Functions.