DEARBORN, Mich. (AP) — Ford made the wrong bet on small pickup trucks in 2011. It hopes to put things right — and win back customers — with the 2019 Ford Ranger.

Ford is unveiling the North American version of the Ranger on Sunday ahead of the Detroit auto show. It goes on sale next spring, eight years after Ford pulled it off the market in the U.S. and Canada.

Back then, the cheap but dependable Ranger was the best-selling truck of its size. But gas prices were high, demand was dwindling and the struggling company wanted to devote more resources to hybrids and to improving fuel economy in its full-size F-150 pickup. The company shuttered the 86-year-old Minnesota factory where the Ranger was made.

“It was politically correct to cast aside pickups at the time,” says Dave Sullivan, manager of product analysis for the market research firm AutoPacific. A rival small pickup, the Dodge Dakota, was pulled off the market the same year.

The Ford factory is still closed, but everything else has changed. Gas prices are low. Ford is profitable and has the cash to invest in new vehicles. And while the market for midsize trucks did get smaller after peaking in the mid-1990s, it never went away. Automakers sold 448,000 midsize pickups in the U.S. in 2016; that’s forecast to grow to 470,000 in 2019, according to the consulting company IHS Markit. The midsize Chevrolet Colorado and Toyota Tacoma both notched sales increases last year even though overall U.S. sales were down.

Ford has continued selling the Ranger abroad; it’s the best-selling pickup in Europe and New Zealand. But in the U.S., it thought buyers who needed to haul things occasionally would gravitate toward SUVs.

The company gradually realized there was still U.S. demand for a smaller, easy-to-maneuver pickup. So much demand, in fact, that GM shifted van production out of its Wentzville, Missouri, plant so it could make more midsize trucks.

Affordability was also an issue, says Todd Eckert, Ford’s truck marketing manager. As buyers add more features to full-size trucks, the average price of an F-Series pickup has crept past $45,000. By contrast, the Colorado starts at $20,200. Ford isn’t yet releasing pricing, but it will be competitive with other midsize trucks.

Ford will market the Ranger as a vehicle for urban adventurers. It has a terrain management system that automatically adjusts the transmission and vehicle controls for driving in snow, mud or sand. A new trail control feature maintains a set speed even on slow, bumpy trails.

The North American Ranger shares its underpinnings with the Ranger that’s on sale globally. But to meet U.S. safety standards and customer expectations, the frame was reinforced with high-strength steel. Steel bumpers were added in the front and rear to better resemble the F-150, which isn’t a big seller outside North America.

Under the hood is the same 2.3-liter EcoBoost four-cylinder engine that powers the Ford Mustang sports car. Ford says that will give the truck the power of a V6 engine with the fuel economy of a four-cylinder. It’s mated to a 10-speed transmission. Unlike the Tacoma, Ford won’t offer a manual transmission. Ford isn’t yet releasing horsepower, fuel economy, payload or towing capacity.

The Ranger will be offered in two-door or four-door configurations with a choice of a 5-foot or 6-foot bed. That will suit Dan MacLeod, 28, an insurance broker from Menomonee Falls, Wisconsin, who wants room for car seats and a bed that will fit his hunting and fishing gear. MacLeod used to drive an F-150 and now he drives a GMC Yukon SUV, but he prefers Ford trucks and will buy a Ranger if he likes what he sees.

But other fans are already dismissing the new Ranger. Alex Orians, a sophomore at Xavier University who is originally from Canton, Ohio, owns a 1996 Ranger, but he doesn’t like the rounded styling of the new Ranger. Orians also suspects that while the Ranger has sentimental value for some drivers, most will prefer something more capable and comfortable.

“If I had the capital for a new pickup, an F-150 would be the first place I’d look,” Orians said.

Stephanie Brinley, a senior analyst with IHS, says as long as consumer confidence remains strong — and it was at a 17-year high in November — there will be a niche market for rugged trucks like the Ranger.