Emergency services were called after the incident took place at a property on Preston Terrace shortly after 12 am on Wednesday.
No attempt was made to set light to the petrol, and the Scottish Fire and Rescue Service removed the liquid. No one was injured.
In an online statement, Police Scotland added: “Enquiries are ongoing to establish the full circumstances and anyone with information can call 101, quoting reference 0012 of 15 June.”