TOKYO -- In a cramped neighborhood drugstore alongside a case of murky oriental herbal drinks sits a stack of large plastic packages bearing a face and logo familiar to millions of American parents.

"Pam-pahs," as they are called here -- Pampers diapers to U.S. consumers -- are one of those increasingly common species in Japan: an American product that not only sells, but sells well.

At a time when polls show Americans growing restive with the onslaught of Japanese products and money in the United States, a trend is starting in the other direction.

While IBM and McDonald's are the most well-known examples of American products that have made it here, so too have Domino's Pizza (with the same 30-minute delivery guarantee); Schick razor blades; Oreo cookies; Kodak film; M&Ms; Nike shoes; Levi's blue jeans; Microsoft computer software; Haagen-Dazs ice cream; and McIlhenney Co. Tabasco sauce, to name a few.

Coca-Cola makes more money selling soft drinks in Japan, including its made-for-Japan canned coffee and Oolong tea, than in the United States, according to analysts here.

Few of the companies will say it has been easy. In fact, some recently have chosen to bail out, deterred by the high cost of operating here and the long time it takes to get established.

But even U.S. trade negotiators acknowledge it can be done, albeit with difficulty. A composite study of a successful foreign firm prepared by the U.S. Embassy and used in recent trade talks concluded that foreigners can make it here, but "government regulations, lack of antitrust enforcement and traditional business practices combined to make this an extremely difficult and costly process."

Pampers's experience here shows what it involves. Procter & Gamble Co., maker of the diaper, created the Japanese market for disposable diapers in 1977 and then nearly lost it to more creative Japanese competitors a few years later. Now, after a costly redesign of business practices and the product itself, Pampers has become the single best-selling brand again.

"It's a totally different ballgame here," said Ronald G. Pearce, president of Procter & Gamble Far East Inc. "It has been a rough and rocky road. But today, after many years of hard and expensive learning, we are a factor here."

When Pampers arrived in Japan in 1977, it was virtually the only disposable diaper on the market. Japanese mothers, eager to shed the mess of washing cloth diapers, snapped them up. Pampers dominated the market for the next several years.

But the diapers were imported without modification from the United States, and they were not quite suited to Japanese consumer needs. Made entirely of pulp, they were bulky, which made it difficult to transport and then store in tiny Japanese apartments; they often leaked, making them a nuisance to use at night or on outings.

Japanese companies, meanwhile, did what Japanese companies have done for years when shown a promising new development: They modified it and made it better. Working to come up with a more compact and absorbent diaper more to the liking of Japanese mothers, Japanese companies developed super-absorbent polymers, basically powders that sop up liquid and turn it into a gel. Instead of ending up with a wet, leaky diaper after four hours of use, they made a diaper that, in the box, was half the size of Pampers and, on the baby, absorbed liquids, leaving the child dry and less prone to diaper rash.

"They made a better mousetrap. It just revolutionized the industry and P&G didn't see it coming," said Joy Walbert, an analyst with Salomon Bros. in Tokyo.

Within months the Japanese diaper brands -- "Moonies" and "Merries" -- had swept the market. By 1983, "Pampers was virtually driven out of business," acknowledged Pearce. The competition combined with other problems in P&G's Japanese operation, he said, and "We actually came very close to joining the ranks, along with hundreds of foreign companies, who have failed to enter the Japanese market successfully."

Pearce declined to discuss the finances of Procter & Gamble Far East. But it was clear by the mid-1980s that the company needed a major revamping, and not only in the diaper area.

That meant better research about what Japan's quality-conscious consumers wanted. It also meant closer relationships with wholesalers and retailers, to make them feel part of the company and more loyal to the product. P&G earlier had made inroads into Japan's complex distribution system; now it also began offering costly services unheard of in the United States but expected in Japan, such as 24-hour delivery.

Most importantly, though, it meant making a better product, Pearce said.

In 1985, Procter & Gamble came out with its own version of super-absorbent Pampers.

"We were so far behind we just had to do it step by step," said Pearce. It was an expensive and time-consuming process of the sort that has convinced other foreign firms to not bother with the Japanese market. It also has produced a diaper that Americans living in Japan say is much softer and more compact -- better -- than U.S.-made Pampers.

Today, according to Pearce, Pampers is the best-selling disposable diaper in Japan. Salomon's Walbert and other analysts estimate that it has about a 25 percent market share.

P&G has several other best-selling products here as well, including Japan's top-selling shampoo-rinse combination, a compact laundry detergent and, one of the hit products of the last year, Whisper sanitary napkins. According to Walbert, Whisper is so popular because P&G did several years of market research, using test groups, and came up with a product tailored to the needs of Japanese women, such as having a wrapper that makes almost no noise when opened.

The result has been that P&G's Japanese sales now exceed $1 billion and Japan probably will soon replace Germany as the company's largest foreign market. An added benefit of this new presence, according to Walbert, is that P&G's huge Japanese competitors are now so busy defending their flanks that they have little time to challenge P&G in the United States and other markets.

Pearce said he believes the market here is not as closed as many critics have suggested. A company succeeds in Japan if it is willing to adapt, both its product and its way of doing business, and is willing to accept that it takes time and money to get established here, he said.

"From our point of view it's different. We accepted those differences and found a way to break through," said Pearce. "You just can't roll out something here that worked in another country and expect it to sell."

It can be a long and tiring process, he said, but "our experience has shown that the market was open enough for us to get in."