The company once operated more than a dozen restaurants in the state but shuttered them by the early 2000s, citing logistical problems and poor relationships with franchisee partners.

Dunkin’ temporarily abandoned its California dreams as the international business grew to more than 3,000 restaurants. Today the chain serves its signature Munchkins and Coolattas at nearly 900 stores in South Korea, but has only three nontraditional stores in obscure California locations: on a Marine base, inside a hotel, and at a highway rest stop.

Now the coffee chain is preparing to take another shot in a market where its toughest competitor, Starbucks Corp., dominates with more than 2,500 stores.

Dunkin’ plans to open its first traditional restaurant in Modesto, Calif., on Tuesday and a second store in Santa Monica in the following weeks.

Three additional restaurants in Long Beach, Downey, and Whittier are expected before the end of the year. Franchisees have signed agreements to open nearly 200 stores by 2020 and the company intends to eventually grow to 1,000 stores in the state.

“We’ve learned a lot about operating out West,” said Nigel Travis, chief executive of Dunkin’ Brands. “We’ve been incredibly impressed with the quality of the franchisees.”

But Dunkin’ had to learn the hard way.

The chain was so eager to enter California in the 1990s that it “hopscotched a lot of the country,” said Grant Benson, vice president of global franchising and business development at Dunkin’ Brands.

The nearest distribution center was in Chicago, and truck drivers hauled products thousands of miles to the California stores. “It left a lot of gaps where we didn’t have a supply chain and any development,” Benson said.

Travis has also said that Dunkin’ was less selective with its franchisee partners and did not properly train them.

Dunkin’ vs. Starbucks in California

Locations of the first new traditional restaurants in California, compared to the current locations of Starbucks restaurants in the Golden State.

Future Dunkin' Donuts traditional locations

Starbucks locations

The company renewed its plans to move into California a few years ago and began building up its network of stores in the West, entering Denver and Salt Lake City in the past year.

The California stores will be supplied from a Phoenix distribution center, and the company intends to open a new warehouse in California as more restaurants get off the ground.

Benson said the chain has also upgraded its training program. It is working with a mix of existing franchisees that operate Dunkin’ restaurants in other states and new partners with experience in California.

Software programs that aggregate data on demographics, competition, and traffic will help the company select the best locations for restaurants, he said.

Darren Tristano, an executive vice president at the food industry research firm Technomic, said that California is a major growth opportunity for the Canton company.

Dunkin’ was the second-largest coffee chain in the United States last year, with $6.7 billion in annual sales and a 30.9 percent market share, according to Technomic. Starbucks posted $11.7 billion in sales and a 53.8 percent share last year. Technomic does not track sales by state.

And although Dunkin’ is entering a region dominated by Starbucks, it will appeal to a different customer, Tristano said.

Starbucks typically opens in middle- to upper-income neighborhoods and generally draws more affluent consumers, Tristano said. Dunkin’ prices are slightly lower,
and the chain primarily draws middle- to lower-income consumers who represent a larger percentage of the workforce.

The stores tend to be smaller than at Starbucks, which means Dunkin’ pays less for real estate. They also can open more stores in nontraditional spaces, such as gas stations and convenience stores, he said.

Dunkin’ will serve its hot brews in paper cups in California — a move Tristano lauded and said environmentally conscious consumers will expect in the Golden State. The company will use the same polypropylene recyclable cup that was introduced in Somerville in May to comply with a citywide ban on disposable polystyrene, often referred to as styrofoam.

“When you look at how the brand has evolved over time, they should have a pretty good opportunity to grow there,” he said. “Today I think the California market is ready for Dunkin’.”