After leaving Gordonstoun in early 1939, Philip completed a term as a cadet at the Royal Naval College, Dartmouth, then repatriated to Greece, living with his mother in Athens for a month in mid-1939. At the behest of the Greek king, George II (his first-cousin), he returned to Britain in September to resume training for the Royal Navy. He graduated from Dartmouth the next year as the best cadet in his course. During the Second World War, he continued to serve in the British forces, while two of his brothers-in-law, Prince Christoph of Hesse and Berthold, Margrave of Baden, fought on the opposing German side. Philip was appointed as a midshipman in January 1940. He spent four months on the battleship , protecting convoys of the Australian Expeditionary Force in the Indian Ocean, followed by shorter postings on , on , and in British Ceylon. After the invasion of Greece by Italy in October 1940, he was transferred from the Indian Ocean to the battleship in the Mediterranean Fleet.