Several states had competed for the coveted project, which will be able to turn out 300,000 vehicles per year and will produce the Toyota Corolla compact car for North America and a new small SUV from Mazda. Alabama Gov. Kay Ivey and company executives held a joint news conference to announce that the facility is coming to the Huntsville area not far from the Tennessee line. Production is expected to begin by 2021.

"This is indeed a great day in Alabama," Ivey said. "Thank you for believing in the potential of our people in the great state of Alabama. ... Toyota and Mazda, thank you so much. Welcome to sweet home Alabama."

To lure the plant, the state offered an incentive package of $370 million in tax abatements and investment rebates, Alabama Commerce Secretary Greg Canfield said. That figure does not include a local incentive package still being finalized. The state will also provide workforce training.

Akio Toyoda, president of Toyota Motors, said the new facility is something of a homecoming since the company already has one plant in the state.

The new Huntsville plant will be just 14 miles (22 kilometers) from Toyota Motor Manufacturing of Alabama, which produces four-cylinder, V-6 and V-8 engines for several Toyota models.

The decision to pick Alabama is another example of foreign-based automakers building U.S. factories in the South. To entice manufacturers, Southern states have used a combination of lucrative incentive packages, low-cost labor and a pro-business labor environment since the United Auto Workers union is stronger in Northern states.

Alabama was tied with Tennessee as the fifth-largest producer of vehicles in the country last year, according to the Center for Automotive Research, an industry think tank in Ann Arbor, Michigan. The state produced 9 percent of the cars made in the U.S., the center said.

"Alabama won a first place trophy today in being selected for that plant," said Dave Sullivan, product analysis manager at AutoPacific Inc., an automotive research company. Sullivan said the factory itself is a huge asset for the state, but it will also cause economic ripples by bringing spinoff jobs at suppliers and service companies in the area.

U.S. sales of small cars fell nearly 10 percent last year as buyers continued a massive shift toward SUVs and pickup trucks. Corolla sales fell 14 percent for the year, to just less than 309,000, according to Autodata Corp.

Still, Toyota and Mazda have said their collaboration will respect mutual independence and equality. Toyota, which makes the Prius hybrid, Camry sedan and Lexus luxury models, already provides hybrid technology to Mazda, which makes compact cars for Toyota at its Mexico plant.

The sheer cost of the plant also makes a partnership logical, as it boosts cost-efficiency and economies of scale. Working together on green and other auto technology also makes sense as the segment becomes increasingly competitive because of concerns about global warming, the environment and safety.

Alabama started on the road to becoming an auto manufacturing hub in 1993 when Mercedes chose it as the location for a manufacturing plant after the state offered a then-eye popping $250 million incentive package. Honda and Toyota followed by putting engine plants in the state. In 2002, Hyundai announced an assembly facility in Montgomery.

AP Auto Writer Tom Krisher contributed to this story from Detroit, Michigan.

Governor Kay Ivey looks on during a press conference on Wednesday, Jan. 10, 2018, in Montgomery, Ala. The press conference was held to announcing production plants to be build by Mazda and Toyota in Huntsville, Ala. Albert Cesare / Advertiser

Governor Kay Ivey speaks during a press conference on Wednesday, Jan. 10, 2018, in Montgomery, Ala. The press conference was held to announcing production plants to be build by Mazda and Toyota in Huntsville, Ala. Albert Cesare / Advertiser

Governor Kay Ivey speaks during a press conference on Wednesday, Jan. 10, 2018, in Montgomery, Ala. The press conference was held to announcing production plants to be build by Mazda and Toyota in Huntsville, Ala. Albert Cesare / Advertiser

Governor Kay Ivey thanks, from left, Akio Toyoda, Toyota Motor Corporation president, and Masamichi Kogai, Mazda Moror Corporation president and CEO, during a press conference on Wednesday, Jan. 10, 2018, in Montgomery, Ala. The press conference was held to announcing production plants to be build by Mazda and Toyota in Huntsville, Ala. Albert Cesare / Advertiser

Masamichi Kogai, Mazda Moror Corporation president and CEO, speaks during a press conference on Wednesday, Jan. 10, 2018, in Montgomery, Ala. The press conference was held to announcing production plants to be build by Mazda and Toyota in Huntsville, Ala. Albert Cesare / Advertiser

Akio Toyoda, Toyota Motor Corporation president, speaks during a press conference on Wednesday, Jan. 10, 2018, in Montgomery, Ala. The press conference was held to announcing production plants to be build by Mazda and Toyota in Huntsville, Ala. Albert Cesare / Advertiser

Akio Toyoda, Toyota Motor Corporation president, speaks during a press conference on Wednesday, Jan. 10, 2018, in Montgomery, Ala. The press conference was held to announcing production plants to be build by Mazda and Toyota in Huntsville, Ala. Albert Cesare / Advertiser

Akio Toyoda, Toyota Motor Corporation president, shakes the hand of Governor Kay Ivey during a press conference on Wednesday, Jan. 10, 2018, in Montgomery, Ala. The press conference was held to announcing production plants to be build by Mazda and Toyota in Huntsville, Ala. Albert Cesare / Advertiser

Governor Kay Ivey looks on during a press conference on Wednesday, Jan. 10, 2018, in Montgomery, Ala. The press conference was held to announcing production plants to be build by Mazda and Toyota in Huntsville, Ala. Albert Cesare / Advertiser

Akio Toyoda, Toyota Motor Corporation president, speaks during a press conference on Wednesday, Jan. 10, 2018, in Montgomery, Ala. The press conference was held to announcing production plants to be build by Mazda and Toyota in Huntsville, Ala. Albert Cesare / Advertiser