The government has struggled to contain the deficit which has swelled because of costly oil subsidies and sluggish tax revenues prompting global ratings agencies to warn of a possible credit downgrade.