For example, nitrogen (N) is doped in (added to) the n-type starting substrate 1 and the n-type buffer layer 2 as an n-type impurity (n-type dopant). The n-type buffer layer 2 may be omitted. The first-conductivity-type epitaxial layer 3 in this embodiment is n?-type drift layer 3 and is constituted by first to third n?-type layers 21 to 23 (a first first-conductivity-type epitaxial layer 21; a second first-conductivity-type epitaxial layer 22; and a third first-conductivity-type epitaxial layer 23) that are between the n-type buffer layer 2 and a p-type anode layer 4, and that are stacked sequentially in the order stated from the n-type buffer layer 2 as illustrated in