Patent ID: 7720124

Claim:
A semiconductor device, comprising: a substrate; an active layer formed over the substrate; first nitride semiconductor layers formed over the active layer, the first nitride semiconductor layers containing a p-type impurity; a second nitride semiconductor layer formed on the first nitride semiconductor layers to be in contact with the first nitride semiconductor layers, the second nitride semiconductor layer containing an n-type impurity; and a third nitride semiconductor layer formed between the active layer and the first nitride semiconductor layers, the third nitride semiconductor layer made of AlGaN or GaN and containing an p-type impurity, wherein the second nitride semiconductor layer is a current confinement layer which has an opening for allowing a current to selectively flow in the first nitride semiconductor layers, the first nitride semiconductor layers include a first layer and a second layer, the first layer is formed on a substrate side, the second layer is formed between the first layer and the second nitride semiconductor layer, the composition of the first layer includes indium, and the first layer is a diffusion suppressing layer that suppresses diffusion of the impurity included in the third nitride semiconductor layer.