On a recent Tuesday morning, Rod Coligado, a co-founder and sometime barista of the bakeshop and espresso bar Butler, in Williamsburg, informed a regular patron that her cortado’s milk options were limited. “We’ve got almond, soy, coconut, or macadamia,” he said. “But the oat is gone.” Coligado, who has broad shoulders and wore a cap stamped with the phrase “DEUS EX MACHINA”—referring not to Aristotle but to a Sydney-based “motorcycle life-style concept store”—was talking about oat milk, a neutral-tasting milk substitute made from raw oats.

Oat milk arrived in New York City in 2016, when a sales rep began making the rounds of local coffee shops. Coligado was attracted to his pitch. “It was environmentally sustainable, less water, no added sugar,” he recalled. “And it had already become the No. 2 alternative milk in Europe.” Butler became New York’s second café to carry it. In six months, Butler’s oat-milk consumption quadrupled. Then, as suddenly as it had appeared, oat milk vanished. When Coligado called his supplier, he was told, “New York is out of stock.” Butler’s customers were devastated. “It’s affecting their life styles,” Coligado said. “Something catches on so quickly, and then it just goes away.”

Oatly, the small and unabashedly quirky Swedish company that invented oat milk, couldn’t keep up with demand, Toni Petersson, Oatly’s C.E.O., explained the other day, speaking by phone from the south of Sweden, near Malmö, where the company is based. He sounded serene. “This already happened in both Sweden and the U.K. when we released Oatly there,” he said.

The company’s general manager, Mike Messersmith, argued that periodic shortages contribute to oat milk’s charm, allowing “the humanness of the company to come through.” The oat-milk process, he explained, involves using enzymes to liquefy raw oat kernels. “There’s a tension between speed and quality here,” he said. “We can’t just go to a manufacturer and say, ‘Here’s a bucket of oats, go and make oat milk!’ This was all too much and too soon.”

Oat milk was developed by Rickard Öste, a food scientist at Lund University, based on research on lactose intolerance and sustainable food systems. Öste founded Oatly back in 1994, but for years the product languished. “Nobody wanted it,” Petersson said. An entrepreneur who has dabbled in night clubs and Costa Rican real estate, he was hired as Oatly’s C.E.O. in 2012. “I’d never heard of the company,” he said. “I had no interest in the food space. But when I went to the interview I thought, I’ve been looking for this.” He decided that oat milk needed better marketing. “It’s so awkward to drink oats. And then we were sued by the dairy lobby in Sweden.” The dairy lobby argued that Oatly’s advertising slogans denigrated milk. (The lobby won.) Petersson took out full-page ads protesting the lawsuit, and oat milk soon caught on.

Back in Williamsburg, Coligado took a seat at a brass tabletop—“the aesthetic here is industrial French bistro”—and described pushing oat milk in Brooklyn. “It was a hard sell at first,” he said. “We would go to every alternative-milk customer that came in and say, ‘Hey, have you tried oat milk?’ You get it into their palates. Almond and soy mask poorly extracted coffee, but the oat lets the coffee speak for itself.”

Coligado dug into a gluten-free muffin. Ultimately, he said, “I’ve sold it to people with nostalgia. It’s the milk that’s left at the bottom of the bowl of cereal when you’re a kid.” He gestured to a large acetate photo from Mick and Bianca Jagger’s wedding, in 1971. “South Williamsburg is the last frontier. People here understand nostalgia.”

The oat-milk shortage had forced Coligado to seek out “alternative streams” of the product. “I went to specialty retailers, but someone beat me,” he said. A vender on Amazon was selling quarts for twenty dollars each, marked up from the usual four dollars. Coligado had considered ordering them. “I would do it for a short period of time, to keep my customers happy.”

Missy Robbins, the owner of the nearby restaurant Lilia, stopped in for a coffee, wearing a hat bearing her restaurant’s name. Coligado told her the news.

“There’s an oat-milk shortage? No way,” Robbins said. She went on, “I don’t understand oat milk. It’s like I spilled oatmeal in my coffee.”

Coligado was diplomatic. “What about in your café?” he asked.

“I think we have almond,” she said. “The coffee people told us to only have one milk alternative.”

“So you’re really a purist.”

“I’m a total purist. I only drink whole milk. Who drinks real milk anymore? That’s real nostalgia.” ♦