The adsorption of diborane (B2H6) on clean Ru(0001) and on surfaces precovered by NH3 and oxygen has been studied by means of thermal desorption mass spectroscopy, X-ray photoelectron spectroscopy, Auger electron spectroscopy, and Fourier-transform infrared reflectance absorption spectroscopy. At low coverages, the B2H6 molecules completely dissociated on Ru(0001), producing atomic hydrogen that desorbed as H-2 between 250 and 450 K and boron adatoms that stayed on the surface up to temperatures above 1400 K. At large B2H6 exposures, desorption of the B2H6 multilayer was observed at approximately 150 K, with a broad feature at temperatures between 250 and 400 K due to desorption of chemisorbed B2H6. The presence of boron adatoms enhanced the adsorption energy of NH3 on Ru(0001). Boron-nitrogen adlayers were formed by exposing B/Ru(0001) surfaces to high pressures (5-10 Torr) of NH3 or by coadsorbing NH3 and B2H6 at 90 K with subsequent annealing to 600 K. These adlayers were rich in boron and decomposed at temperatures well above 1100 K. On O/Ru(0001) surfaces, diborane was adsorbed dissociatively, forming strong B-O bonds. Adsorbed atomic oxygen largely reduced the stability of boron-nitrogen adlayers on Ru(0001).