Barium strontium titanate (BSTO) thin films were deposited on Pt(111) by high throughput evaporative physical vapor deposition and then annealed at 650 °C for 30 min under N2 atmosphere. Using advanced transmission electron microscopy, energy-dispersive x-ray spectroscopy and electron energy-loss spectroscopy, we directly show that not only does N substitute for O in the BSTO lattice but that it also compensates for Ti3+ ions, suppressing conductivity, thereby reducing dielectric loss and enhancing dielectric tunability. However, this effect is negated near the film edge where we speculate that exposed Pt acts as a reservoir of adsorbed/absorbed O and alters the local N2 concentration during annealing.