History of the AFP
On 29 November 1917 while campaigning to introduce military conscription, Hughes was the target of eggs thrown by protestors when he arrived at Warwick Railway Station in southern Queensland. Prime Minister Hughes was incensed that the attending Queensland Police would not arrest the offenders under federal law, so when he returned to Parliament he set about drafting legislation to create the Commonwealth Police Force (CPF). The ‘Warwick Incident’ was the last straw for the Prime Minister who was engaged in a range of jurisdictional struggles with the Queensland Government at the time.
via https://www.afp.gov.au/about-us/our-organisation/history-afp