A range sensor comprising: a semiconductor substrate having a light incident surface and a surface opposite to the light incident surface; a photogate electrode provided on the surface opposite to the light incident surface; first and second gate electrodes (TX1, TX2) provided next to the photogate electrode on the surface opposite to the light incident surface; a first semiconductor region provided in the semiconductor substrate at the surface opposite to the light incident surface, the first semiconductor region being configured for readout of respective charges flowing from a region of the semiconductor substrate immediately below the photogate electrode to a first further region immediately below the first gate electrode, a second semiconductor region provided in the semiconductor substrate at the surface opposite to the light incident surface, the second semiconductor region being configured for readout of respective charges flowing from the region of the semiconductor substrate immediately below the photogate electrode to a second further region immediately below the second gate electrode, wherein the first and second semiconductor regions (FD1, FD2) have a conductivity type opposite to that of the semiconductor substrate, the first gate electrode is disposed between the photogate electrode and the first semiconductor region and the second gate electrode is disposed between the photogate electrode and the second semiconductor region; characterized in that the range sensor further comprises: third semiconductor regions each located away from the respective first and second semiconductor regions (FD1, FD2) in a thickness direction of the semiconductor substrate and having a conductivity type opposite to that of the first and second semiconductor regions (FD1, FD2) and an impurity concentration higher than that of the semiconductor substrate, wherein no third semiconductor regions are located immediately below the first and second semiconductor regions, wherein the third semiconductor regions are configured to not prevent the depletion layer spreading from the region immediately below the photogate electrode to spread towards the light incident surface, and wherein the third semiconductor regions are configured to prevent the depletion layer spreading from the first and second semiconductor regions towards the light incident surface. a semiconductor substrate having a light incident surface and a surface opposite to the light incident surface; a photogate electrode provided on the surface opposite to the light incident surface; first and second gate electrodes (TX1, TX2) provided next to the photogate electrode on the surface opposite to the light incident surface; a first semiconductor region provided in the semiconductor substrate at the surface opposite to the light incident surface, the first semiconductor region being configured for readout of respective charges flowing from a region of the semiconductor substrate immediately below the photogate electrode to a first further region immediately below the first gate electrode, a second semiconductor region provided in the semiconductor substrate at the surface opposite to the light incident surface, the second semiconductor region being configured for readout of respective charges flowing from the region of the semiconductor substrate immediately below the photogate electrode to a second further region immediately below the second gate electrode, wherein the first and second semiconductor regions (FD1, FD2) have a conductivity type opposite to that of the semiconductor substrate, the first gate electrode is disposed between the photogate electrode and the first semiconductor region and the second gate electrode is disposed between the photogate electrode and the second semiconductor region; characterized in that the range sensor further comprises: third semiconductor regions each located away from the respective first and second semiconductor regions (FD1, FD2) in a thickness direction of the semiconductor substrate and having a conductivity type opposite to that of the first and second semiconductor regions (FD1, FD2) and an impurity concentration higher than that of the semiconductor substrate, wherein no third semiconductor regions are located immediately below the first and second semiconductor regions, wherein the third semiconductor regions are configured to not prevent the depletion layer spreading from the region immediately below the photogate electrode to spread towards the light incident surface, and wherein the third semiconductor regions are configured to prevent the depletion layer spreading from the first and second semiconductor regions towards the light incident surface. third semiconductor regions each located away from the respective first and second semiconductor regions (FD1, FD2) in a thickness direction of the semiconductor substrate and having a conductivity type opposite to that of the first and second semiconductor regions (FD1, FD2) and an impurity concentration higher than that of the semiconductor substrate, wherein no third semiconductor regions are located immediately below the first and second semiconductor regions, wherein the third semiconductor regions are configured to not prevent the depletion layer spreading from the region immediately below the photogate electrode to spread towards the light incident surface, and wherein the third semiconductor regions are configured to prevent the depletion layer spreading from the first and second semiconductor regions towards the light incident surface.