The present invention provides a
semiconductor device and a method for manufacturing a
semiconductor device that can improve yield. [Solution] The
semiconductor device comprises a substrate having a first surface and a second surface opposite to the first surface, a first
nitride semiconductor layer having a third surface in contact with the second surface and a fourth surface opposite to the third surface, with a recess formed on the fourth surface, a second
nitride semiconductor layer provided in the recess, and a first
metal layer provided on the second
nitride semiconductor layer, wherein through holes are formed in the substrate, the first nitride semiconductor layer and the second nitride semiconductor layer, penetrating the substrate, the first nitride semiconductor layer and the second nitride semiconductor layer and reaching the first
metal layer, and the second
metal layer is in contact with the first metal layer and covers the first surface and the inner wall surface of the through holes, the first metal layer contains
cobalt, and the second nitride semiconductor layer contains 1.0 × 10 18 cm -3 It contains
impurity atoms at the above concentrations.