HMS Endeavour, also known as HM Bark Endeavour, was a British Royal Navy first voyage of discovery, to Australia and New Zealand, from 1769 to 1771. She was launched in 1764 as the collier Earl of Pembroke, and the Navy purchased her in 1768 for a scientific mission to the Pacific Ocean and to The Navy renamed and commissioned her as His Majesty' Bark the Endeavour. She departed Plymouth in August 1768, rounded Cape Horn, and reached Tahiti in time to observe the 1769 transit of Venus across the Sun. She then set sail into the largelyuncharted ocean to the south, stopping at the Pacific islands of Huahine, Borabora, and Raiatea to allow Cook to claim them for Great Britain. In September 1769, she anchored off New Zealand, the first European vessel to reach the islands since Abel Tasman' Heemskerck 127 years earlier. In April 1770, Endeavour became the first ship to reach the east coast of Australia, when Cook went ashore at what is now known as Botany Bay. Endeavour then sailed north along the Australian coast. She narrowly avoided disaster after running aground on the Great Barrier Reef, and Cook had to throw her guns overboard to lighten her. He then beached her on the mainland for seven weeks to permit rudimentary repairs to her hull. On 10 October 1770, she limped into port in Batavia (now named Jakarta) in the Dutch East Indies, for more substantial repairs, her crew sworn to secrecy about the lands they had discovered. She resumed her westward journey on 26 December, rounded the Cape of Good Hope on 13 March 1771, and reached the English port of Dover on 12 July, having been at sea for nearly three years.