A semiconductor laser element comprising: an n-side semiconductor layer formed of a nitride semiconductor; an active layer disposed on or above the n-side semiconductor layer and formed of a nitride semiconductor; and a p-side semiconductor layer disposed on the active layer , formed of a nitride semiconductor, and comprising: an undoped first part disposed in contact with an upper face of the active layer and comprising at least one semiconductor layer, an electron barrier layer disposed in contact with an upper face of the first part , containing a p-type impurity, and having a band gap energy that is larger than a band gap energy of the first part , and a second part disposed in contact with an upper face of the electron barrier layer and comprising at least one p-type semiconductor layer containing a p-type impurity, wherein at least a portion of the p-side semiconductor layer forms a ridge projecting upward and having an upper face and a lower end, and wherein the lower end of the ridge is positioned at the first part ; wherein the first part comprises: an undoped p-side composition graded layer in which a band gap energy increases towards the electron barrier layer , and an undoped p-side intermediate layer disposed on or above the p-side composition graded layer , and wherein the lower end of the ridge is positioned at the p-side intermediate layer . an n-side semiconductor layer formed of a nitride semiconductor; an active layer disposed on or above the n-side semiconductor layer and formed of a nitride semiconductor; and a p-side semiconductor layer disposed on the active layer , formed of a nitride semiconductor, and comprising: an undoped first part disposed in contact with an upper face of the active layer and comprising at least one semiconductor layer, an electron barrier layer disposed in contact with an upper face of the first part , containing a p-type impurity, and having a band gap energy that is larger than a band gap energy of the first part , and a second part disposed in contact with an upper face of the electron barrier layer and comprising at least one p-type semiconductor layer containing a p-type impurity, an undoped first part disposed in contact with an upper face of the active layer and comprising at least one semiconductor layer, an electron barrier layer disposed in contact with an upper face of the first part , containing a p-type impurity, and having a band gap energy that is larger than a band gap energy of the first part , and a second part disposed in contact with an upper face of the electron barrier layer and comprising at least one p-type semiconductor layer containing a p-type impurity, wherein at least a portion of the p-side semiconductor layer forms a ridge projecting upward and having an upper face and a lower end, and wherein the lower end of the ridge is positioned at the first part ; wherein the first part comprises: an undoped p-side composition graded layer in which a band gap energy increases towards the electron barrier layer , and an undoped p-side intermediate layer disposed on or above the p-side composition graded layer , and wherein the lower end of the ridge is positioned at the p-side intermediate layer . an undoped p-side composition graded layer in which a band gap energy increases towards the electron barrier layer , and an undoped p-side intermediate layer disposed on or above the p-side composition graded layer , and wherein the lower end of the ridge is positioned at the p-side intermediate layer . <EOS>