Limited availability of platinum is a potential threat to fuel cell commercialization. Since the 1970s, alternative catalysts to the electrochemical reduction of oxygen have been obtained from heat treatment at T > 600 degrees C of carbon with a non-noble metal and a source of nitrogen atoms. However, the process by which the heat treatment activates these materials remains an open question. Here, we report that the activation process of carbon black and iron acetate heat-treated in NH(3) comprises three consecutive steps: (i) incorporation of nitrogen atoms in the carbon, (ii) micropore formation through reaction between carbon and ammonia, and (iii) completion of active sites in the micropores by reaction of iron with ammonia. Step (ii) is the slowest. Moreover, the microporous surface per mass of catalyst controls the macroscopic activity when enough nitrogen atoms are incorporated in the structure of the carbon support. These facts should help in determining the structure of the active sites and in identifying methods to increase the site density of such catalysts.