Ford revealed Thursday the price paid for its aggressive push to curry favor with President Trump: $200 million.

Within fourth-quarter results that met analyst expectations, Ford said it took a $200 million charge to cover the cost of abandoning a small-car factory in Mexico that would have built the Focus compact. The automaker announced the turnabout earlier this month after Trump, as candidate and president-elect, sharply criticized its plans south of the border.

The move may end up paying off in the long run and is peanuts for a $49 billion company. Ford said it’s actually saving $500 million by not completing construction of the Mexico factory. Since that decision, the automaker has worked its way into Trump’s good graces and is now looking to parlay that relationship into more lenient regulations and tax breaks that could boost profits. Chief Executive Officer Mark Fields met twice this week with Trump, who also speaks regularly with Executive Chairman Bill Ford.

The jockeying underscores how Ford’s financial well-being will be linked for the next four years to the whims of a White House taking special interest in where cars are built and how fuel efficient they’ll have to be.

“The president is going to be very good for business and the economy,” Fields said in an interview with Bloomberg Television on Thursday.

Still, the U.S. market has “plateaued,” he said. “We don’t have any plans to build any new plants, but clearly we want to continue to grow our business.”

Abandoning the Mexico plant contributed to a quarterly net loss for the company, its first since 2009. Excluding charges related to the factory cancellation and a pension plan loss, Ford reported profit of 30 cents a share, matching analysts’ estimates.

Ford reiterated earnings will drop this year as it begins to invest about $4.5 billion toward electrification and spends on self-driving vehicles. The stock declined 3.2 percent to $12.38 as of $12:44 p.m. in New York.

“While there’s a lot of enthusiasm and we’re all very optimistic about what may come out of the new administration in terms of growth policies, there’s also more uncertainty, there’s more volatility, potentially,” Chief Financial Officer Bob Shanks said.

Ford reported a net loss of about $800 million last quarter, compared with income of $1.9 billion a year earlier. Excluding the pension-related charge, profit fell 18 percent to $2.13 billion.

Ford will still move production of Focus compacts to an existing Mexico factory, though it’s also plowing $700 million into a plant south of its headquarters in Dearborn, Michigan.

The investment Ford announced in Flat Rock, near Detroit, will prime the plant to build an all-electric sport utility vehicle and hybrid Mustang pony car by 2020, plus an autonomous vehicle for ride sharing or hailing services the next year.

Ford has said outlays on electrification and self-driving cars will lead to a one-year blip that should give way to higher net income in 2018. It’s starting this year with plans to dial back production in North America by about 39,000 vehicles compared with a year earlier, to 815,000 cars and trucks.

Fields has expressed confidence Trump follows through on promises to cut corporate taxes and create a more favorable business environment.