We carry out an analysis of the quantization of anomalous gauge theori
es inside the Batalin-Vilkovisky scheme. Working on the chiral QCD2, w
e show that by considering the group elements as dynamical variables o
ne is able to construct a local solution, the Wess-Zumino term, for th
e master equation. Thus the gauge independence of the generating funct
ional is restored. Also, the BRST charge is built up showing that in t
he extended space this operator recovers the nilpotency.