Philip was born into the Greek and Danish royal families. He was born in Greece, but his family was exiled from the country when he was an infant. After being educated in France, Germany, and the United Kingdom, he joined the British Royal Navy in 1939, aged 18. From July 1939, he began corresponding with the 13-year-old Princess Elizabeth, whom he had first met in 1934. During the Second World War he served with distinction in the Mediterranean and Pacific Fleets. After the war, Philip was granted permission by George VI to marry Elizabeth. Before the official announcement of their engagement in July 1947, he abandoned his Greek and Danish royal titles, became a naturalised British subject, and adopted his maternal grandparents' surname Mountbatten. He married Elizabeth on 20 November 1947. Just before the wedding, he was created Duke of Edinburgh, Earl of Merioneth and Baron Greenwich. Philip left active military service when Elizabeth became queen in 1952, having reached the rank of commander, and was formally made a British prince in 1957.