TORONTO -- The Canadian dollar was higher Wednesday as political uncertainties around the globe overshadowed less than encouraging domestic trade data.

The loonie rose 0.35 of a cent to 95.15 cents US coming off the lowest closing level since October 2011, reached Tuesday.

The improvement came as Statistics Canada reported that the country's merchandise deficit declined sharply to $303 million in May from $951 million in April as imports fell much more quickly than exports.

Still, the shortfall added to what is the longest run of merchandise trade deficits in 25 years as imports were down 3.2 per cent to $39.6 billion after four consecutive monthly increases. Exports contracted 1.6 per cent to $39.3 billion

Meanwhile, political turmoil in Egypt and the re-emergence of sovereign debt worries in Portugal sent commodity prices higher.

Egypt's unfolding political crisis has now seen the country's military oust embattled President Mohammed Morsi, suspend the country's constitution and call early elections.

The strife has helped push the price of oil to its highest level in more than a year, rising above US$100 a barrel for the first time since May 2012. The August contract on the New York Mercantile Exchange ended ahead $1.64 at US$101.24 a barrel.

August bullion lifted $8.50 to US$1,251.90 an ounce on the Nymex. Copper prices rose 3.2 cents to US$3.174 a pound for the September contract.

Portugal's financial markets went into a nosedive Wednesday as the government teetered on the brink of collapse, alarming investors and reigniting concerns about the eurozone's strategy for dealing with its prolonged financial crisis.

Prime Minister Pedro Passos Coelho has so far defied calls to resign but was running out of options to keep his centre-right coalition government together following the resignations of two key ministers in a spat over austerity.