A semiconductor device comprising: a semiconductor layer (11, 12, 13) having a first face provided with a trench and a second face opposite to the first face; a gate electrode provided in the trench; a source electrode provided on the first face of the semiconductor layer (11,12,13); and an insulating layer provided in the trench so as to insulate the semiconductor layer (11,12,13) and the gate electrode from each other; wherein the semiconductor layer (11,12,13) includes a first semiconductor layer (11,12) of a first conductivity type constituted of silicon carbide, and a second semiconductor implanted layer of a second conductivity type opposite to the first conductivity type, the trench being formed so as to penetrate through the second semiconductor layer and to reach the first semiconductor layer (11,12), wherein the second semiconductor layer includes a close portion which is closer to the second face of the semiconductor layer (11, 12, 13) than is the trench, the trench and the close portion being spaced from each other when viewed in a widthwise direction (y) perpendicular to a depthwise direction (x) of the trench, wherein the semiconductor layer (11, 12, 13) further includes a semiconductor region of the first conductivity type formed around and in direct contact with the trench, wherein a recessed portion is provided at the second semiconductor layer, the second semiconductor layer comprises a first region and a second region, the first region being located below the recessed portion and including the close portion, the second region being connected with the first region in the widthwise direction (y), the first region having a first bottom boundary in contact with the first semiconductor layer (11, 12), the second region having a second bottom boundary in contact with the first semiconductor layer (11, 12), the first region and the second region comprising the same dopant impurity and having the same dopant impurity concentration, the close portion and the recessed portion being disposed so as to overlap in the widthwise direction (y), the recessed portion being smaller in size than the close portion in the widthwise direction (y), and including a bottom surface facing the close portion, the bottom surface being spaced apart from a top surface of the first semiconductor layer (11,12) toward the first face of the semiconductor layer (11,12,13,14), wherein a part of the source electrode is disposed in the recessed portion and wherein the semiconductor layer (11, 12, 13) further includes a high-concentration semiconductor region of the second conductivity type under the recessed portion, wherein a size of the recessed portion in the depthwise direction (x) is substantially equal to a distance between the first bottom boundary and the second bottom boundary in the depthwise direction (x). a semiconductor layer (11, 12, 13) having a first face provided with a trench and a second face opposite to the first face; a gate electrode provided in the trench; a source electrode provided on the first face of the semiconductor layer (11,12,13); and an insulating layer provided in the trench so as to insulate the semiconductor layer (11,12,13) and the gate electrode from each other; wherein the semiconductor layer (11,12,13) includes a first semiconductor layer (11,12) of a first conductivity type constituted of silicon carbide, and a second semiconductor implanted layer of a second conductivity type opposite to the first conductivity type, the trench being formed so as to penetrate through the second semiconductor layer and to reach the first semiconductor layer (11,12), wherein the second semiconductor layer includes a close portion which is closer to the second face of the semiconductor layer (11, 12, 13) than is the trench, the trench and the close portion being spaced from each other when viewed in a widthwise direction (y) perpendicular to a depthwise direction (x) of the trench, wherein the semiconductor layer (11, 12, 13) further includes a semiconductor region of the first conductivity type formed around and in direct contact with the trench, wherein a recessed portion is provided at the second semiconductor layer, the second semiconductor layer comprises a first region and a second region, the first region being located below the recessed portion and including the close portion, the second region being connected with the first region in the widthwise direction (y), the first region having a first bottom boundary in contact with the first semiconductor layer (11, 12), the second region having a second bottom boundary in contact with the first semiconductor layer (11, 12), the first region and the second region comprising the same dopant impurity and having the same dopant impurity concentration, the close portion and the recessed portion being disposed so as to overlap in the widthwise direction (y), the recessed portion being smaller in size than the close portion in the widthwise direction (y), and including a bottom surface facing the close portion, the bottom surface being spaced apart from a top surface of the first semiconductor layer (11,12) toward the first face of the semiconductor layer (11,12,13,14), wherein a part of the source electrode is disposed in the recessed portion and wherein the semiconductor layer (11, 12, 13) further includes a high-concentration semiconductor region of the second conductivity type under the recessed portion, wherein a size of the recessed portion in the depthwise direction (x) is substantially equal to a distance between the first bottom boundary and the second bottom boundary in the depthwise direction (x).