In the early hours of Monday morning, fireworks rang out across the globe to mark the beginning of the Chinese Lunar New Year. In China, the festival week begins with a bountiful New Year’s Eve dinner with extended family. To ensure a prosperous year ahead, celebrants typically feast upon auspicious fare such as dumplings, rice cakes, fish and “longevity noodles.” Snacking on tangerines is also thought to bring good luck.

In the United States, the Chinese diaspora celebrates too with parades, firecrackers and, of course, delicious food. Among the largest Spring Festival celebrations in the country is the one held every year in San Francisco, the city with the biggest and oldest Chinatown in the United States. It was here that Americans were first introduced to what is now one of their favorite cuisines—but the delicious food that might be eaten during this week’s festival had a long and often difficult time getting there.

In 1849, the rumors of gold nuggets that drew thousands of East Coast get-rich-quick hopefuls out to California during the Gold Rush also resonated across the Pacific with the merchants of Canton in South China. For centuries, the rich Chinese port city had been a center of international trade and commerce, and its entrepreneurial classes immediately saw the opportunity that glittered in the San Francisco Bay. The first Chinese immigrants to this region of the United States went into the lucrative business of providing services for the miners as traders, grocers, merchants and restaurant owners. This initial group of migrants encouraged later waves of Chinese emigrants eager to mine the hills themselves or become pioneer agricultural laborers. All of these workers were undoubtedly also hungry for good Chinese cooking that reminded them of land they had left behind.

By the mid-19th century, the United States had what could be called a fledgling restaurant culture at best, while much of China had had many centuries worth of experience in hospitality. Needless to say, those who frequented the earliest Chinese restaurants in San Francisco were impressed by the establishments’ cleanliness and professionalism. “The best restaurants,” as one patron recalled, “were kept by Chinese and the poorest and dearest by Americans.” Distinguished by what one 1850 article described as “long three-cornered flags of yellow silk” that were typically hung outside, Chinese-owned eating houses were known to serve some of the best food in the city. Their cheap prices also made their appeal to young and hungry 49-ers of all backgrounds undeniable.

But even while hordes of eaters chowed down at so-called “chow chow houses,” the early American relationship with Chinese immigrants themselves was much less palatable. The group was already conspicuous for their foreign dress and contrasting language, and as gold resources declined, anti-Chinese sentiment grew. In spite of how admirable many Californians found the work ethic of Chinese laborers, this immigrant group was increasingly scapegoated for declining wages and fewer job opportunities. Eventually, that sentiment became law. Harsh legislation against Chinese immigrants to the United States began with California’s mining tax against foreigners and the effort in 1852 to restrict the “introduction of Chinese and other Asiatics,” and it culminated in 1882 with the passage of the Chinese Exclusion Act, which banned all Chinese laborers from entering the United States. The act would not be repealed until 1943.

Get our History Newsletter. Put today's news in context and see highlights from the archives. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

And, despite the success of early Chinese restaurants in California, that food became a focal point of many an anti-Chinese argument. Prejudiced American groups were quick to label the growing numbers of Chinatowns in cities throughout the country as “nuisances,” largely because of what was termed the unpleasant “stench” of Chinese kitchens, and many 19th century editorialists earnestly asked “Do the Chinese Eat Rats?” Even the United States’ Congress served up such rhetoric; in an 1879 speech Senator James G. Blaine of Maine declared, “You cannot work a man who must have beef and bread, and would prefer beef, alongside a man who can live on rice.” Such would necessarily “bring down the beef-and-bread man to the rice standard.” Blaine, unsurprisingly, was among the earliest supporters of the Chinese Exclusion Act.

In spite of the racist backlash, good food was still good food. The turn of the 20th century saw the emergence of Chop Suey joints as hip and affordable places for young urbanites to spend a night out. Like most popular Chinese dishes in the United States, this particular mélange of meat, egg and vegetable wasn’t actually Chinese. In the 1920s American eaters were shocked when they learned that “the average native of any city in China knows nothing of chop suey.” Writer Jennifer 8. Lee calls this dish the biggest culinary prank one culture has ever pulled on another; translated from the original Chinese, Chop Suey means “Odds & Ends,” more colloquially known as “leftovers.”

Regardless of its dubious authenticity, such adaptation of Chinese cooking to American palates was a key element in the proliferation and popularization of Chinese cuisine in the United States. Throughout the early 20th century, “Chinese” dishes became sweeter, boneless, and more heavily deep-fried. Broccoli, a vegetable unheard of in China, started appearing on menus and fortune cookies, a sweet originally thought to be from Japan, finished off a “typical” Chinese meal.

It wasn’t until the 1960s and 1970s that the United States got its first taste of “authentic” Chinese cuisine. Up until that time, the dishes that most Americans were calling “Chinese food” were still largely derived from Cantonese cuisine, which is just one of eight of the broader regional cuisines of the Middle Kingdom. The liberalization of American immigration policy in 1965 brought new arrivals from Hong Kong, Taiwan, and the Mainland, who in turn brought with them the foods they had enjoyed in areas like Hunan, Sichuan, Taipei and Shanghai.

During these tasty decades, the United States experienced a renaissance in good Chinese eats, particularly in cities with large Chinese populations like New York and San Francisco. In 1967, the fine-dining Sichuan restaurant Shun Lee Palace became the first Chinese eatery to receive a four-star review from the New York Times. In the years that followed, many more skilled Chinese chefs began immigrating to the ever-more receptive and lucrative United States.

The growing obsession with all things Chinese was fueled in large part by President Richard Nixon’s famous 1972 visit to Beijing, the first time an American President had visited China since its 1949 Revolution. Demand for Chinese food, of whatever form, exploded overnight, with amazed eaters seeking out the Peking duck and multi-course Chinese feasts they had just witnessed the President eating on TV. Chinese restaurants proliferated in towns big and small.

Today, according to the Chinese American Restaurant Association, there are over 45,000 Chinese restaurants currently in operation across the United States. This number is greater than all the McDonald’s, KFCs, Pizza Huts, Taco Bells and Wendy’s combined. When asked to rank their favorite types of restaurants, Chinese places almost always come out on top. On every day of the Lunar calendar, it seems there’s nothing quite as all-American some good Chinese food.

Emelyn Rude is a food historian and the author of Tastes Like Chicken, available in August of 2016.

Contact us at letters@time.com.