The first shot fired by the British Empire in World War I was not on the battlefields of Europe - it came from a windswept fort south of Melbourne, half a world away.

That moment - 100 years ago on Tuesday - will be marked with a ceremony at the former military base where a 24-year-old Australian soldier fired on the German merchant ship, SS Pfalz, which was attempting to flee Melbourne less than four hours after hostilities began.

Fired first shot: John Purdue.

The ceremony is one of a national series of events marking the centenary of World War I. John Purdue, a sergeant with the army's Royal Australian Garrison Artillery, was stationed at Fort Nepean on the Mornington Peninsula. At 12.45pm on August 5, 1914, he was ordered to fire on the Pfalz to stop it escaping Port Phillip Bay into the open sea. From his gun emplacement, and with support from his team, he blasted a shell across its bow.

The Pfalz, which was carrying German consular officials and contraband, was captured and used as an Australian troop ship in the war. Its crew was interned as prisoners of war. A small plaque at the fort commemorates the shot and the first moments in a war that shaped much of the 20th century.