This paper presents a theoretical analysis of the nitrogen afterglow induced by a microwave discharge in N-2 and N-2-Ar. The initial conditions at the beginning of the afterglow are obtained by solving the electron Boltzmann equation, under the effective field approximation, coupled to the rate-balance equations for the N-2(X (1) Sigma(g)(+), v) levels, the electronically excited states of N-2, the N(S-4) atoms and the main positive ions. The electric field for the maintenance of the discharge is self-consistently determined. Once the concentrations of heavy species in the discharge have been obtained, the relaxation in the afterglow of the above system of equations is investigated. It is shown that, as a result of the mechanisms leading to associative ionization by collisions between the electronic metastable species N-2(A (3) Sigma(u)(+)) + N-2(a'(1) Sigma(u)(-)) and N-2(a'(1) Sigma(u)(-)) + N-2(a'(1) Sigma(u)(-)), associated with the near-resonant V-E energy-exchange reaction N-2(X, v greater than or equal to 12) + N-2(+)(X-2 Sigma(g)(+)) --> N-2(X, v - 12) + N-2(+)(B-2 Sigma(u)(+)), the characteristic emission of the 1(-) system of N-2(+) can occur in the afterglow of a N-2 microwave discharge at p = 2 Torr after a time t similar or equal to 10(-3) s. However, in the case of N-2-Ar mixtures the N-2(+)(B-2 Sigma(u)(+)) state arises only for higher pressures and longer residence times (such as t similar or equal to 5 x 10(-3)-10(-2) s in a N-2-50% Ar mixture at p = 10 Torr). The predicted dependences on the pressure and gas-mixture composition of the temporal evolutions of [N-2(B-3 Pi(g))] and [N-2(+)(B-2 Sigma(u)(+))] concentrations are shown to be in qualitative agreement with reported spectroscopic measurements.