Between the n?-type lifetime reduced layer 22 and the pn junction surface 12 between the p-type anode layer 4 and the n?-type drift layer 3, the third n?-type layer 23 in which only nitrogen is doped and no vanadium is doped, is disposed in contact with the p-type anode layer 4 and the n?-type lifetime reduced layer 22. Therefore, for example, in the edge termination region 32, even when the edge termination structure 5 is disposed so as to be in contact with the pn junction surface 12 between the p-type anode layer 4 and the n?-type drift layer 3, variation of the activation rate of the p-type regions constituting the edge termination structure 5 may be avoided, enhancing device performance.