In a semiconductor laser, a n-type AlGaInP clad layer is formed on a
n-type GaAs substrate and an active layer having an emission wavelength
of 600 to 850 nm is formed on the n-type AlGaInP clad layer. A p-type
AlGaInP clad layer is formed on the active layer and a p-type AlGaAs
contact layer in which the Al composition is controlled so that the
p-type AlGaAs contact layer has an optical bandgap larger than that of
the active layer is formed on the p-type AlGaInP clad layer. A p-type
GaAs cap layer is formed on the p-type AlGaAs contact layer.