A lateral single-photon avalanche diode, comprising: - a semiconductor body , - a pn-junction , and - anode and cathode terminals , - the semiconductor body including a base layer of semiconductor material of a first type of conductivity, a first further layer of semiconductor material of the first type of conductivity on the base layer and a second further layer of semiconductor material of the first type of conductivity on the first further layer , - wherein the base layer and the second further layer have an intrinsic doping or a doping concentration that is lower than a doping concentration of the first further layer and the doping concentration of the first further layer is selected to achieve a desired breakdown voltage, - the diode further comprises a doped region of a second type of conductivity, which is opposite to the first type of conductivity, - wherein the pn-junction is formed between the doped region and the base layer , the first further layer and the second further layer of the semiconductor body, and - the anode and cathode terminals being electrically connected to one of the first further layer and the doped region , respectively, characterized in that - the first further layer is a first epitaxial layer grown on the base layer , - the second further layer is a second epitaxial layer grown on the first further layer , - the semiconductor body comprises a trench , the trench penetrating the second further layer and the first further layer and extending into the base layer , the trench being filled with an electrically conductive material doped for the second type of conductivity, thus forming the doped region . - a semiconductor body , - a pn-junction , and - anode and cathode terminals , - the semiconductor body including a base layer of semiconductor material of a first type of conductivity, a first further layer of semiconductor material of the first type of conductivity on the base layer and a second further layer of semiconductor material of the first type of conductivity on the first further layer , - wherein the base layer and the second further layer have an intrinsic doping or a doping concentration that is lower than a doping concentration of the first further layer and the doping concentration of the first further layer is selected to achieve a desired breakdown voltage, - the diode further comprises a doped region of a second type of conductivity, which is opposite to the first type of conductivity, - wherein the pn-junction is formed between the doped region and the base layer , the first further layer and the second further layer of the semiconductor body, and - the anode and cathode terminals being electrically connected to one of the first further layer and the doped region , respectively, - the first further layer is a first epitaxial layer grown on the base layer , - the second further layer is a second epitaxial layer grown on the first further layer , - the semiconductor body comprises a trench , the trench penetrating the second further layer and the first further layer and extending into the base layer , the trench being filled with an electrically conductive material doped for the second type of conductivity, thus forming the doped region . <EOS>