Queensland's eastern coastline borders the Coral Sea, an arm of the Pacific Ocean. The state is bordered by the Torres Strait to the north, with Boigu Island off the coast of New Guinea representing the northern extreme of its territory. The triangular Cape York Peninsula, which points toward New Guinea, is the northernmost part of the state's mainland. West of the peninsula's tip, northern Queensland is bordered by the Gulf of Carpentaria. To the west, Queensland is bordered by the Northern Territory, at the 138th meridian east, and to the southwest by northeastern South Australia. The state's southern border with New South Wales is constituted in the east by the watershed from Point Danger to the Dumaresq River, and the Dumaresq, Macintyre and Barwon rivers. The west of the southern border is defined by the 29th parallel south (including some minor historical encroachments), until it reaches South Australia.