In the early 1880s, a wharf near the city of Whangārei had been established in the upper reaches of Whangārei Harbour. Roughly 20 years later the maintenance bill was rising and the wharf's inadequacies were being revealed as it was too shallow for some vessels to access. The deep-water wharves in nearby Onerahi were considerably more desirable, and in 1899 approval was granted to extend the railway from Whangārei to Onerahi. It took until July 1901 for construction to get underway, and in May 1902 a contract was let to build a bridge across Whangārei Harbour. It was 323 metres long with a central lifting span, and completed in 1904. It was not long before the bridge was nicknamed the Gull Roost, for obvious reasons. Some work continued for two years after the bridge was finished, but construction ground to a halt in 1906 and no more work was done for four years. It recommenced during 1910 and the line was finished the next year. It came into the possession of the Railways Department on 2 October 1911. At this time, it was the southern end of the isolated Whangārei railway network, which extended northwards to Ōkaihau and Opua, and construction of the North Auckland Line that would link the isolated section to Auckland and the national rail network was underway.
Operation
For over a decade, the Onerahi Branch was a very busy line. When it opened, the primary method of transport between Auckland and Whangarei for both passengers and freight involved a steamer between Auckland and Onerahi and the train from Onerahi to Whangārei. Trains ran to connect with the steamers, with both dedicated goods services and "mixed" trains for both passengers and freight operating. In 1925, the North Auckland Line was completed, establishing a direct railway link from Whangārei to Auckland. This was far superior to the coastal steamers and both passenger and freight traffic on the Onerahi Branch rapidly spiralled downwards. The condition of the wharf was also declining, and when the Great Depression set in there was no reason to continue operating the railway. It closed on 30 June 1933. In 1937, the wharf was removed.
The branch today
Unfortunately, the Gull Roost bridge no longer exists, but some of the track has been converted into a public walking track, the Waimahanga Walkway. It includes footbridges over two creeks using the former railway bridge piers. Some formation not used by the walkway is also visible.
Similar proposals
In the 1970s, two proposals to build a similar branch line from Whangārei to a deepwater port were made. This line was to closely follow the route of a much earlier proposed line that was nearly built. In 1914, a railway was surveyed to run south from Whangārei to Waipu, and although World War I delayed the start of any work, the construction of formation was in progress in 1920. However, in 1924, construction was abandoned without any track being laid as road transport was beginning to compete with rail and an insignificant branch to serve local farming interests was no longer seen as necessary. Many years later, a deepwater harbour was established at nearby Marsden Point as an oil port, and after the 1973 oil crisis it was proposed to convert the nearby Marsden BPower Station to use coal from the Waikato. The railways have always carried significant tonnages of Waikato coal, and this proposal would have certainly required a railway link had it come to fruition. In 1979 it was suggested that Marsden Point could be used for forestry export, and a 14-kilometre branch from the North Auckland Line was proposed, but it was not built. In 2007, however, the proposal was revived, and the Northland Regional Council is currently negotiating land purchases which would allow the link to be constructed.