Michigan on Wednesday agreed to revise decade-long tax breaks for General Motors in exchange for the company’s commitment to spend at least $3.5 billion more over 10 years, including to build electric pickup trucks in Detroit.

Under the deal — the seventh amendment to the home state automaker’s incentives since 2009 — the value of GM’s maximum tax credit will be cut by $325 million, to approximately $2.28 billion through 2029, and will be capped annually. The company will still have to retain at least 34,750 jobs in Michigan — it has about 45,000 now — but will get flexibility to count more jobs at its headquarters in Detroit and its research, development and engineering campus in the suburb of Warren.

“Overall, this will solidify the company’s continued commitment to growing in our state as well as Michigan’s uncontested leadership in automotive design and manufacturing,” said Jeff Mason, CEO of the Michigan Economic Development Corp.

GM’s Detroit-Hamtramck plant now employs about 800 people. Production of the Chevrolet Impala will cease at the end of February, at which point renovations will begin to produce electric vehicles. The plant will have 2,000 employees once it is at full capacity.

The plan was first announced in October as part of the new labor pact between the automaker and the United Auto Workers union following a strike.

GM spokesman Dan Flores said the amendment to the tax credit “sets the stage for us to continue our significant commitment and investments in Michigan.” He said the Michigan Economic Growth Authority program has helped GM invest more than $10 billion in its Michigan facilities.

“We appreciate our long-standing, productive collaboration with the state of Michigan and look forward to building on this important relationship,” Flores said.

An MEDC memo said the changes will secure GM’s footprint in Michigan and let all its in-state facilities compete for future work and investments.

The last time the state and GM amended the credit was 2015, when they capped the state’s liability but did not specify the amount, citing taxpayer confidentiality. GM agreed to disclose the outstanding credit value, $2.28 billion, this time.

To fully qualify for the annual credit, the company will have to retain 34,750 Michigan jobs that pay on average $1,300 a week — up from $650 under the original 2009 agreement.