We investigated the focused electron beam induced deposition (FEBID) of Ru-containing deposits on SiO2 and sputter-cleaned Si in an ultra-high vacuum. The precursor Ru(CO)4I2 was held at 340 to 345 K, and the applied electron doses were varied from 1.56 to 9.36 C/cm 2 , using a focused electron beam (5 keV, 1.5 nA, 10 nm diameter). Local Auger electron spectroscopy (AES) along with subsequent sophisticated fitting procedures not only revealed the elemental composition but also enabled to determine the thickness of the fabricated deposits. Ru contents of up to 60% can be achieved at lower electron doses; at higher doses, the Ru content decreases to 45% and simultaneously the I content increases. The initially lower iodine content is attributed to simultaneous focused electron beam induced etching (FEBIE), which is found to be competing with the deposition process. The etching is evidenced by atomic force 2 microscopy, where the structures are observed to have negative apparent height for low electron doses. Upon increasing the electron doses, the deposits exhibit positive apparent heights. Hence, the etching is less pronounced at higher electron doses, once the ruthenium surface coverage has increased. The high Ru content and the difficile balance between electron induced deposition and etching considerably expand the possibilities to engineer nanostructured materials.