Mexico’s Finance Ministry got a 321.7 billion peso ($17.1 billion) windfall from the central bank after Donald Trump triggered a plunge in the peso last year, boosting foreign currency reserves. The surplus, announced on Banxico’s website on Wednesday, is almost $4 billion more than last year’s and is a record, according to spokesman Ricardo Medina. The Finance Ministry said it will use at least 70 percent of the funds to reduce its debt burden, with the rest going to the budget stabilization fund or to strengthen the government’s financial position. The peso was the worst performing currency among the world’s most-traded and emerging-market currencies last year, as promises by then presidential candidate and now President Trump to cancel the North American Free Trade Agreement sent it tumbling 17 percent versus the dollar. The currency has made a comeback this year as prospects for a trade deal that benefits both countries improve, and is now the best performer among major currencies. The surplus will reduce the broadest measure of debt to gross domestic product from 50 percent to 49 percent for 2017, Marco Oviedo, head of Latin America economic research at Barclays Plc, estimated. “It’s a good number,” he said in an emailed response to questions from Mexico City, adding that it was more than he expected. “It’s almost 1.6 percent of the country’s GDP and, by law, 1.1 percent of GDP will go to reducing the deficit. It’s definitely positive.” Banxico also decided to earmark 6.6 billion pesos of its total 535 billion pesos in surplus from last year to increase its capital reserves, according to today’s statement. In addition, it will use the surplus to boost its re-evaluation of asset reserves to 268 billion pesos from 207 billion pesos to protect against a possible currency appreciation versus the dollar.