In recent years, Toyota Motor (TM 0.05%) has been the undisputed king of midsize trucks in the U.S. At times, its popular Tacoma model has held as much as two-thirds of the midsize-pickup market.

However, that started to change in late 2014 when General Motors (GM 4.37%) reintroduced its Chevy Colorado midsize pickup, along with its slightly more upscale twin, the GMC Canyon. The Chevy Colorado was named Motor Trend's Truck of the Year for 2015 -- and then again for 2016.

GM's Chevy Colorado has received numerous accolades. Image source: General Motors.

With demand for midsize trucks rising quickly, GM has had no trouble growing in this segment. GM overtook Nissan within months of the Colorado and Canyon launching to become the No. 2 midsize-truck seller in the country. It is now gaining on Toyota -- and by 2017, it could mount a strong challenge to Toyota's segment leadership.

Supply constraints have helped Toyota

General Motors appears to have been caught off-guard by the popularity of the Chevy Colorado and GMC Canyon since those models were reintroduced. Over the past year and a half, the company has repeatedly told investors that demand was outstripping supply, especially for the Colorado.

Thanks to these supply shortages at GM, Toyota was able to hang on to its majority share of the midsize-pickup market in 2015. Toyota Tacoma sales totaled 179,562 units last year, compared to 177,325 units for GM, Chevy, and Nissan competitors combined.

Toyota's greater manufacturing capacity for midsize trucks played a large role in its strong 2015 performance. However, in 2016, GM has started to address its supply issues, which could have a profound impact on Chevy Colorado and GMC Canyon sales over the next year or so.

The Toyota Tacoma is the longtime midsize-truck market leader. Image source: Toyota Motor.

GM boosts midsize-truck production

Entering this year, GM was already running flat-out at its Wentzville, Missouri, factory, which produces the Chevy Colorado and GMC Canyon models. The factory operates on three shifts and has frequent weekend overtime work.

Earlier this year, GM added extra tooling and equipment at the Wentzville plant to increase its production capacity, as my colleague John Rosevear described. Yet that hasn't fully resolved the plant's capacity issues.

Last month, GM took a bigger step by signing a contract with Navistar to assemble some Chevy Express and GMC Savana vans beginning in the first half of 2017. Today, those vans are built in the same Wentzville plant as GM's midsize pickups. Moving some of this production to a different site will give GM more flexibility to increase output of the Colorado and Canyon.

GM starts to gain momentum

General Motors' capacity expansion efforts are already starting to have an impact on Colorado and Canyon sales. Through the first two months of 2016, combined deliveries of the Chevy Colorado and GMC Canyon barely increased on a year-over-year basis. Meanwhile, Toyota Tacoma sales jumped 13.1% year over year.

Since then, the roles have been reversed, as supply of GM's midsize pickups has improved. For the first half of 2016, combined sales of the Colorado and Canyon have surged 21.2% year over year. Just last month, Chevy Colorado deliveries jumped 38% year over year, while the GMC Canyon posted a 34.2% increase.

Meanwhile, Toyota Tacoma sales actually declined 0.9% year over year in June. That left it with a 7% sales gain year to date. Toyota still has a comfortable lead over GM in the midsize truck market, but it is shrinking quickly.

While GM has managed to narrow the gap with Toyota in the past few months, dealers are still complaining that there isn't enough inventory of the Chevy Colorado and GMC Canyon.

GM stated in its June sales release that it expects midsize-pickup availability to improve in the second half of the year. This could help it achieve further share gains at Toyota's expense.

However, GM may not fully resolve its supply constraints until it is able to shift some of its van assembly work to Navistar in early 2017. By the middle of next year, we will see if the Chevy Colorado and GMC Canyon have what it takes to power General Motors past Toyota in the midsize-pickup market.