In
In the edge termination region 32, the p-type epitaxial layer 43 is removed spanning the edge termination region 32 entirely, whereby at the front surface 13a of the semiconductor substrate 10, a recess 13 (concave on the cathode side) at which the edge termination region 32 is lower than the active region 31 is formed. In the edge termination region 32, a front surface 13a′ of the semiconductor substrate 10 is newly formed by the recess 13. At the front surface 13a′ of the semiconductor substrate 10 in the edge termination region 32, the third n?-type layer 23 is exposed. The p-type epitaxial layer 43 and the third n?-type layer 23 may be removed to a predetermined depth at the time of formation of the recess 13.