Buffeted by the global economic crisis , the economy dropped into a sharp recession in the final months of 2008 , and Ottawa posted its first fiscal deficit in 2009 after 12 years of surplus .