He served twice as Liberal Party of Australia , from 2008 Liberal Party of Australia leadership spill to 2009 Liberal Party of Australia leadership spill when he was Leader of the Opposition , and from 2015 to 2018 when he was Prime Minister .