A semiconductor device comprising: an SiC substrate that has a silicon plane having an off-angle of 0 to 5 degrees; an n - -type epitaxial semiconductor layer formed on the silicon plane of the SiC substrate and made of SiC; p-type body regions formed in a surficial portion of the semiconductor layer; a respective p + -type body contact region formed in a center of a surficial portion of each of the body regions; a respective n + -type source region formed in each of the body regions and surrounded by the surficial portion of the corresponding body region and surrounding the corresponding body contact region; a gate insulating film composed of a thermally-oxidized film formed by thermally oxidizing the surface of the semiconductor layer and provided on the semiconductor layer and containing nitrogen atoms, the gate insulating film including a first portion having a lower interface in contact with the semiconductor layer outside the body regions, a second portion having a lower interface in contact with the body regions, and a third portion having a lower interface in contact with the source regions; and a gate electrode provided on the gate insulating film in an area extending across the semiconductor layer outside the body regions, the body regions, and the source regions, wherein the third portion of the gate insulating film has a third thickness greater than a first thickness of the first portion and a second thickness of the second portion, the lower interface of the third portion is at a position lower than the lower interface of the first portion, and lower than the lower interface of the second portion. an SiC substrate that has a silicon plane having an off-angle of 0 to 5 degrees; an n - -type epitaxial semiconductor layer formed on the silicon plane of the SiC substrate and made of SiC; p-type body regions formed in a surficial portion of the semiconductor layer; a respective p + -type body contact region formed in a center of a surficial portion of each of the body regions; a respective n + -type source region formed in each of the body regions and surrounded by the surficial portion of the corresponding body region and surrounding the corresponding body contact region; a gate insulating film composed of a thermally-oxidized film formed by thermally oxidizing the surface of the semiconductor layer and provided on the semiconductor layer and containing nitrogen atoms, the gate insulating film including a first portion having a lower interface in contact with the semiconductor layer outside the body regions, a second portion having a lower interface in contact with the body regions, and a third portion having a lower interface in contact with the source regions; and a gate electrode provided on the gate insulating film in an area extending across the semiconductor layer outside the body regions, the body regions, and the source regions, wherein the third portion of the gate insulating film has a third thickness greater than a first thickness of the first portion and a second thickness of the second portion, the lower interface of the third portion is at a position lower than the lower interface of the first portion, and lower than the lower interface of the second portion.