General Motors announced on Thursday that it would invest $24 million in its Fort Wayne, Indiana, factory.

The factory builds full-size Chevy and GMC pickups and has received a total investment of over $1.2 billion.

Politics matter in the announcement. President Donald Trump has criticized GM for idling a plant in Ohio, and Indiana is home to Vice President Mike Pence and a state that Trump carried in 2016.

Regardless of the politics, GM needs to keep pace with Ford and Fiat Chrysler Automobiles' RAM brand in 2019's pickup-truck war.

Visit Business Insider's homepage for more stories.

General Motors CEO Mary Barra announced on Thursday that the automaker would invest an additional $24 million in its Fort Wayne, Indiana, factory, where the carmaker builds full-size Chevy and GMC pickup trucks.

Pickups are at the profitable core of GM's business, enabling the automaker to rake in cash that it can use to invest in electric and autonomous vehicles. But some of GM's money has to pay for its bread and butter, and Fort Wayne has now received $1.2 billion in total, out of the $23 billion GM said it has pumped into US manufacturing since the financial crisis.

Read more: It looks like Trump just announced GM's plan to sell its Ohio car factory to an electric-truck company — before GM could

"We are building Chevrolet and GMC crew cab pickups at record volume and mix levels to meet customer demand and the $24 million investment will allow us to build even more," Barra said in a statement.

For the announcement, Barra traveled to the plant in northeastern Indiana, the home state of Vice President Mike Pence — and a state that President Donald Trump carried by more than a half million votes in the 2016 election.

Politics matter — but so do pickups

A GMC pickup being assembled at the plant. GM

GM and Barra have skirmished with Trump over the idling of a factory in Lordstown, Ohio — another state that went for Trump in 2016. The No.1 US automaker is now in talks to sell that factory after ending production of the Chevy Cruze sedan there and offering to relocate displaced workers.

Politics probably didn't dominate GM's decision on Fort Wayne, although Barra was sending a clear message to the White House. The business rationale for putting funds into the factory is strong, given the popularity — and profitability — of what it builds.

"Combined sales of the Chevrolet Silverado 1500 and GMC Sierra 1500 crew cab pickups, which launched in the second half of 2018, were up 20 percent in the first quarter of 2019 versus a year ago," GM said in a statement, adding that it's "projecting another significant increase for the second quarter."

Barra has been laser-focused on maximizing GM's return on invested capital, so this move is just the latest example of the company putting funds where they can ensure the best outcomes for consumers and shareholders.

GM's Chevy and GMC brands are also in an old-fashioned truck war with Ford and Fiat Chrysler Automobiles' RAM, so it can ill afford to skimp on pickups. In 2018, Chevy and GMC combined sold over 900,000 units.