A semiconductor device comprising: a semiconductor substrate, including a first conductivity type drift layer; a second conductivity type body layer contacting an upper surface of the drift layer, a part of the body layer being exposed at an upper surface of the semiconductor substrate; a first conductivity type source layer provided on a part of an upper surface of the body layer, being exposed at the upper surface of the semiconductor substrate and being separated from the drift layer by the body layer, and a first conductivity type drain layer contacting a lower surface of the drift layer and being exposed at a lower surface of the semiconductor substrate; the semiconductor device further comprising a trench gate penetrating the body layer and contacting the drift layer; a second conductivity type first semiconductor layer surrounding a bottom of the trench gate and being separated from the body layer by the drift layer in a vertical direction when the semiconductor device is seen in a lateral direction of the trench gate; the semiconductor device being characterized by a first conductivity type second semiconductor layer disposed along one of end portions of the trench gate in a longitudinal direction of the trench gate, one of vertical end portions of the second semiconductor layer contacting the body region and the other of the vertical end portions of the second semiconductor layer contacting the first semiconductor layer; and a connecting layer, one of vertical end portions of the connecting layer being connected to the body region and the other of the vertical end portions of the connecting layer being connected to the first semiconductor layer, the connecting layer contacting the second semiconductor layer, and the connecting layer being separated from the one of the end portions of the trench gate in the longitudinal direction of the trench gate by the second semiconductor layer. a semiconductor substrate, including a first conductivity type drift layer; a second conductivity type body layer contacting an upper surface of the drift layer, a part of the body layer being exposed at an upper surface of the semiconductor substrate; a first conductivity type source layer provided on a part of an upper surface of the body layer, being exposed at the upper surface of the semiconductor substrate and being separated from the drift layer by the body layer, and a first conductivity type drain layer contacting a lower surface of the drift layer and being exposed at a lower surface of the semiconductor substrate; the semiconductor device further comprising a trench gate penetrating the body layer and contacting the drift layer; a second conductivity type first semiconductor layer surrounding a bottom of the trench gate and being separated from the body layer by the drift layer in a vertical direction when the semiconductor device is seen in a lateral direction of the trench gate; the semiconductor device being characterized by a first conductivity type second semiconductor layer disposed along one of end portions of the trench gate in a longitudinal direction of the trench gate, one of vertical end portions of the second semiconductor layer contacting the body region and the other of the vertical end portions of the second semiconductor layer contacting the first semiconductor layer; and a connecting layer, one of vertical end portions of the connecting layer being connected to the body region and the other of the vertical end portions of the connecting layer being connected to the first semiconductor layer, the connecting layer contacting the second semiconductor layer, and the connecting layer being separated from the one of the end portions of the trench gate in the longitudinal direction of the trench gate by the second semiconductor layer.