Thin films of amorphous Ta-Si-N alloys were deposited by reactive RF sputtering of a Ta5Si3 target in an Ar/N2 ambient. These alloy films were tested as diffusion barriers between Al and Si, as well as between Cu and Si. Electrical measurements on Schottky diodes and on shallow n+p junction diodes were used to evaluate the thermal stability of the <Si>/W48Si20N32(20 nm)/Ta36Si14N50(80 nm)/Al(1000 nm) metallization. The amorphous W48Si20N32 contacting layer was added to raise the Schottky barrier height of the metallization on n-type Si. Both the shallow junctions and the Schottky diodes are stable up to 700-degrees-C for 20 min (above the Al melting point of 660-degrees-C) which makes this material the best thin-film diffusion barrier on record. Furthermore, the same Ta36Si14N50 amorphous film maintains the integrity of the I-V characteristics of the shallow n+p junctions with the <Si>/TiSi2(30 nm)/Ta36Si34N50(80 nm)/Cu(500 nm) metallization up to 900-degrees-C for 30 min annealing in vacuum. The TiSi2 contacting layer was added to assure an ohmic characteristic of the contact. For comparison, the same shallow junctions with <Si>/Cu metallizations were shorted after annealing at 300-degrees-C.