A front surface of the semiconductor substrate 320 is constituted by the n-type silicon carbide layer 325 that constitutes the second n-type layer 306 in the active region 31, and is constituted by the n?-type silicon carbide layer 323 that constitutes the n?-type drift layer 304 in the edge termination region 32. A rear surface of the semiconductor substrate 320 is constituted by the p-type starting substrate 301. The first and the second p-type layers 302, 305 are doped with, for example, aluminum as a p-type impurity. The second n-type layer 306 is doped with, for example, nitrogen as an n-type impurity. At the front surface of the semiconductor substrate, the silicon carbide layers 324, 325 in the edge termination region 32 are removed, whereby similarly to the first embodiment, the recess (concave on a p-type starting substrate 301 side) 13 at which the edge termination region 32 is lower than the active region 31 is formed.