The New Guinea campaign opened with the battles for New Britain and New Ireland in the Territory of New Guinea in 1942. Rabaul, the capital of the Territory, was overwhelmed on 22–23 January and was established as a major Japanese base from where the Japanese landed on mainland New Guinea and advanced towards Port Moresby and Australia. Having had their initial effort to capture Port Moresby by a seaborne invasion disrupted by the U.S. Navy and Australian navy in the Battle of the Coral Sea, the Japanese attempted a landward attack from the north via the Kokoda Track. From July 1942, a few Australian reserve battalions, many of them very young and untrained, fought a stubborn rearguard action against the Japanese attack, over the rugged Owen Stanley Ranges. The militia, worn out and severely depleted by casualties, held out with the assistance of Papuan porters and medical assistants, and were relieved in late August by regular troops from the Second Australian Imperial Force, returning from action in the Mediterranean Theatre.