A field-effect transistor comprising: a semiconductor laminated structure comprising a first semiconductor layer formed of a first nitride semiconductor, a second semiconductor layer formed of a second nitride semiconductor having a bandgap energy larger than that of the first nitride semiconductor, and a two-dimensional electron gas layer generated at an interface on the second semiconductor layer side of the first semiconductor layer; a source electrode; a drain electrode; and a gate electrode disposed over the second semiconductor layer, the gate electrode being adapted to control the flow of electrons passing through the two-dimensional electron gas layer between the source electrode and the drain electrode; a third semiconductor layer formed of a p-type nitride semiconductor containing p-type dopant between the gate electrode and the second semiconductor layer; and a fourth semiconductor layer formed of a nitride semiconductor between the third semiconductor layer and the gate electrode, wherein the fourth semiconductor layer is in contact with the gate electrode and has a larger bandgap than that of the third semiconductor layer, and made of Al b Ga 1-b N, with 0<b<1, wherein the fourth semiconductor layer is an undoped layer, wherein the fourth semiconductor layer has the same width as and is formed only on the third semiconductor layer, wherein the third and fourth semiconductor layers (24, 22) are not in contact with the source electrode and the drain electrode, and wherein the part of the second semiconductor layer at the source electrode side of the third semiconductor layer and the part of the second semiconductor layer at the drain electrode side of the third semiconductor layer are exposed from the third semiconductor layer and the fourth semiconductor layer. a semiconductor laminated structure comprising a first semiconductor layer formed of a first nitride semiconductor, a second semiconductor layer formed of a second nitride semiconductor having a bandgap energy larger than that of the first nitride semiconductor, and a two-dimensional electron gas layer generated at an interface on the second semiconductor layer side of the first semiconductor layer; a source electrode; a drain electrode; and a gate electrode disposed over the second semiconductor layer, the gate electrode being adapted to control the flow of electrons passing through the two-dimensional electron gas layer between the source electrode and the drain electrode; a third semiconductor layer formed of a p-type nitride semiconductor containing p-type dopant between the gate electrode and the second semiconductor layer; and a fourth semiconductor layer formed of a nitride semiconductor between the third semiconductor layer and the gate electrode, wherein the fourth semiconductor layer is in contact with the gate electrode and has a larger bandgap than that of the third semiconductor layer, and made of Al b Ga 1-b N, with 0<b<1, wherein the fourth semiconductor layer is an undoped layer, wherein the fourth semiconductor layer has the same width as and is formed only on the third semiconductor layer, wherein the third and fourth semiconductor layers (24, 22) are not in contact with the source electrode and the drain electrode, and wherein the part of the second semiconductor layer at the source electrode side of the third semiconductor layer and the part of the second semiconductor layer at the drain electrode side of the third semiconductor layer are exposed from the third semiconductor layer and the fourth semiconductor layer.