FILE PHOTO: The International Monetary Fund logo is seen outside the headquarters building in Washington, U.S. September 4, 2018. REUTERS/Yuri Gripas/File Photo

(Reuters) -The International Monetary Fund on Friday said its executive board had approved a new two-year, $24 billion flexible credit line for Mexico to act as a buffer against external risks, noting the country has steadily reduced its reliance on the precautionary fund in recent years.

The Mexican authorities intend to treat the new arrangement as precautionary and canceled their previous line of about $35 billion, the IMF said in a statement.

This marks Mexico's eleventh such arrangement since 2009, with the credit line's size shrinking from a peak of around $88 billion in 2017.

The IMF said the lower amount "reflects the Mexican economy's increased buffers and resilience."

Mexican officials had requested a new credit line for another two years at a lower access level, citing the government's strong finances that make it less vulnerable to sudden shifts in capital flows, the Bank of Mexico and Mexico's finance ministry said in a joint statement.

However, IMF Deputy Managing Director Nigel Clarke noted the country's economy faces headwinds.

"Economic activity in Mexico remains soft, constrained by needed fiscal consolidation and still restrictive monetary policy, as well as the dampening effect of trade tensions," he said.

He added that while the country has shown resilience, "trade-related risks have risen since the last FCL review."

The new credit line will continue to play an important role in supporting Mexico's macroeconomic strategy and provide "insurance against tail risks while bolstering market confidence," according to the fund.

(Reporting by Chris Thomas and Kylie Madry in Mexico City; Editing by Leslie Adler and Brendan O'Boyle)