The U.S. trade deficit hit its highest level in nine years in 2017, the government reported Tuesday, defying President Donald Trump's efforts to reduce the country's trade gap. The Commerce Department said the trade deficit in December rose to $53.1 billion, up from $50.4 billion the previous month and the highest since October 2008. For all of last year, the deficit in goods and services rose to $566 billion, the highest level since $708.7 billion in 2008. Imports set a record at $2.9 trillion, eclipsing exports of $2.3 trillion. The United States ran an $810 billion deficit in the trade of goods and a $244 billion surplus in services, such as banking and education. The politically sensitive deficit with China increased to a record $375.2 billion in 2017, and the goods gap with Mexico rose to $71.1 billion. Countries run trade deficits when they buy more from other countries than they sell. Trump has sought to reduce the deficits with China and Mexico. His administration is considering whether to impose trade sanctions on China for the theft of U.S. intellectual property, and also is re-negotiating the North American Free Trade Agreement (NAFTA) with Mexico and Canada. Trump believes trade deficits are a sign of economic weakness and are the result of "unfair" competition by U.S. trading partners. Most economists, however, see deficits largely as the result of Americans spending more than they produce, and purchasing imports to fill the gap.