The Liffey rises in the Liffey Head Bog between the mountains of Kippure and Tonduff in the northern section of the Wicklow Mountains, forming from many streamlets at Sally Gap. It flows for through counties Wicklow, Kildare and Dublin before entering the Irish Sea at its mouth at the midpoint of Dublin Bay, on a line extending from the Baily lighthouse to the Muglin Rocks. It crosses from County Wicklow into County Kildare at Poulaphouca and from County Kildare into County Dublin at Leixlip, with most of its length being in Kildare.