NAGOYA, Japan — Toyota Motor Corp. is set to start building plants again following a three-year freeze, spending around $1.25 billion on factories in Mexico and China, people familiar with the matter said Friday.

The plants are likely to start operating around 2018 or 2019 and will expand Toyota’s production capacity by several hundred thousands of vehicles, the people said. An official decision is expected to be made this month, they said.

The world’s best-selling automaker is finally shifting into expansion mode after a period of caution during which President Akio Toyoda called for an overhaul of manufacturing lines.

In the past several years, Toyota has been developing new manufacturing equipment and engineering technology that can be used to shrink the size of new plants and make some existing plants more efficient. The automaker recently said it can cut initial plant investment by 40 percent compared with 2008 levels.

“We are gradually starting to witness the next stage for new plants,” Toyoda told investors last month. He said the company had to make a “sweeping change” to “make our plants competitive, instead of merely pursuing volume.”

Toyota aggressively built new plants in the early and mid-2000s, leaving it with excess capacity and high fixed costs after the global financial crisis. It hasn’t made a major investment in new factories since 2012, when it announced a new plant in Thailand.

“We truly suffered. We rapidly expanded production, but there was no time for workers to think,” Mitsuru Kawai, a senior managing officer at Toyota, told reporters on Friday in Nagoya, Japan.

While Toyota froze its investments — a move it has called “a willful pause” — rivals including Volkswagen AG have expanded capacity to meet growing demand. Mexico has developed into an auto-manufacturing hub that exports cars to the U.S., while China is the world’s biggest auto market.

“In China, the European and U.S. automakers like General Motors are leading,” Tetsuo Ogawa, one of Toyota’s managing officers leading the China business, told reporters Friday. He said Toyota holds a 5 percent to 6 percent share in the market and is putting priority on quality over sales growth.

The Chinese auto market continues to grow, although the pace of gains is expected to slow this year. The China Association of Automobile Manufacturers said it expected passenger-vehicle sales to rise 8 percent to 21.3 million vehicles this year, compared with 9.9 percent growth in 2014 and a 16 percent increase in 2013. Toyota said last year that it was aiming to double sales in China to around 2 million vehicles.