To obtain a small on resistance and a large breakdown voltage.
An internal trench IT is formed in the surface of a first layer 5 having first conductivity type. An impurity region 14 located on the sidewall SD of the internal trench IT and having second conductivity type different from the first conductivity type, and a non-injection region 11a having first conductivity type are formed, from the first layer 5 by injecting impurities into the sidewall SD of the internal trench IT. A second layer 11b filling the internal trench IT, having first conductivity type and forming a drift region 11 along with the non-injection region 11a is formed. When the second layer 11b is formed, the impurity region 14 is embedded in the drift region 11. A switching element having a channel of first conductivity type is formed on the drift region 11.