Last month’s Beijing premiere of Captain America: The Winter Soldier had all the hallmarks of a blockbuster. Young girls screamed along the red carpet. A 100-foot-wide screen broadcast the film’s dramatic trailer, complete with Chinese subtitles. The stars of the sequel, Chris Evans as Captain America and Scarlett Johansson as Black Widow, tried to hide signs of jetlag as they answered press questions about visiting the Forbidden City and their dinner plans with Jackie Chan later that night.

Disney DIS is the U.S. company that was behind the release of the superhero flick — but it was the Chinese video site Youku Tudou that staged the Beijing premiere. Youku, once known as the YouTube of China, spent weeks building hype for the Captain America sequel (the Chinese translation is “American team leader”) with a blitz of behind-the-scenes interviews and promotional ties-in. Its site will stream the film later this year.

Just five years ago, a partnership between a Hollywood studio and Chinese video site would have been unimaginable. Many of the Chinese sites, Youku in particular, hosted so many pirated versions of U.S. television shows and films that Hollywood regularly sent armies of lawyers to China to complain.

What has happened since is a transformation so rapid that it could only happen in China. Youku, Sohu, Tencent’s v.qq, and many other video sites are now bonafide partners with Hollywood. They send tens of millions of dollars a year to studios through content licensing deals, helping to build fan bases in China for television shows as unlikely as CBS’s 2 Broke Girls and Netflix’s House of Cards. Streaming top U.S. movies, still in the early stages, is the next major opportunity.

“Growth in China is pretty explosive,” says Doug Belgrad, head of Columbia Pictures, whose parent Sony Pictures Entertainment SNE has signed streaming deals with almost 10 Chinese video sites over the past three years. “We’re being fairly aggressive in licensing our library,” Belgrad says.

Early challenges

To foster improved relationships with Hollywood, the Chinese sites first had to overcome privacy. They did so by fighting each other. Sohu, which started as a search engine, was part of a group that sued Youku in 2009 to protect the licensed Chinese content it was buying. The money at stake is massive — this year, ads that run with online video in China are expected to pull in $3 billion in sales.

Sohu ultimately prevailed in that case, and Youku, the country’s biggest video site, went on to focus on building a library of legal content. All of the sites spent heavily on new shows between 2010 and 2012 as the fear of losing potential viewers to piracy evaporated. In the last year, Youku has bought rights for 30 Western shows like ABC’s Modern Family and BBC’s Sherlock. Tencent’s v.qq recently added the films Hunger Games: Catching Fire and Saving Mr. Banks and in March said it would double spending on video content to boost market share. Sohu made headlines in the U.S. and China after acquiring rights to the television series Saturday Night Live, Breaking Bad, and House of Cards.

MORE: Fracking’s hottest year in China

But hurdles remain, namely in the form of Chinese censors. The rush for Western shows has attracted attention from China’s regulators, who until recently gave the sites leeway to broadcast almost anything. In late April, the Chinese state-owned press reported that four U.S. shows would be blocked from the streaming sites, including The Big Bang Theory, The Practice, NCIS, and The Good Wife. The move was probably the government’s first major salvo in the war to control online video, which it has been attempting to do since 2009, according to one industry insider.

But censorship is unlikely to go very far, in part because Western content is hugely popular among Chinese viewers. Younger viewers are known to obsess over the movies and shows, and for good reason: Not only is the production quality better than what’s offered in Chinese, but Western movies and TV can become a status symbol, says Melanie Huang of CSM Media Research in Beijing. Telling your Chinese friends you watch House of Cards not only means you are proficient in English, but also that you have interest in the outside world.

Recent successes

Sohu, the third-largest Chinese video site, is the most aggressive buyer of Western content.  The company staged press conferences after adding House of Cards and Saturday Night Live. Last spring, it hosted the cast of The Vampire Diaries in Beijing. For chief executive Charles Zhang, adding U.S. entertainment was pretty simple: Hollywood content was cheap for Chinese sites because its success was not guaranteed, yet demand for pirated shows proved that fans existed in big numbers.

“Thanks to piracy, there’s a general interest,” Zhang tells Fortune as he sits at a massive conference table that doubles as his office at Sohu’s headquarters on Beijing’s northwest side. An admitted fan of Breaking Bad and the 1990s film My Cousin Vinny, Zhang says Sohu moved into buying Western television shows after broadcasting Chinese television dramas.

MORE: Business created China’s pollution problem. Now it needs to fix it

The site added exclusive rights for The Big Bang Theory in 2009. The CBS comedy has not only become Sohu’s the most popular U.S. show with 1.5 billion views, but also all of China’s favorite foreign show. (The show also leads in ratings in its native U.S.) Because of the show’s popularity, government censors may have been trying to send a message by banning the sitcom, despite its uncontroversial plotlines.

Saturday Night Live was another coup for the company. Last year, Broadway Video Enterprises, which distributes the program, received a call from Sohu asking what it would take to bring the show to China. Broadway’s president Britta von Schoeler had tried and failed for 10 years to broadcast SNL in China, but problems always arose: negotiating from New York was difficult and middlemen could never close the deal. “I didn’t know much about them,” she admits. But Sohu agreed to buy the current season of SNL and, following some positive press, signed on for next year’s 40th anniversary season. Though the Sohu deal is “a small fraction” of the revenues from agreements with Netflix or Hulu, von Schoeler says, it finally gives SNL a foothold in China.

Next steps

In recent years, China’s dominant video sites have focused on acquiring rights to Western television programs because of the relative ease of adding advertisements to a show. (Entire TV seasons have many more opportunities for 1-minute commercials than does a film.) But today’s deals for Captain America and others hold promise that movies are becoming China’s next hot ticket. Zhang predicts that the $100 million that Chinese video sites spend to license Western content in 2014 could easily double over the next three years because of new film deals.

“Unlike the U.S., where you have a DVD window and HBO window, in China these don’t exist,” Youku CEO Victor Koo says. Because Chinese theaters are limited by the government to showing 34 foreign films a year, China’s video sites quickly become the destination for Western content. Which is why Disney and Warner Bros. TWX have signed deals with Youku’s subscription movie site called Youku Premium. Koo says the studios are making money on the deals that include revenue sharing agreements.

MORE: Does China’s GDP target hurt the country?

Forecasts indicate that China will become the world’s largest movie market in six years — which means interest in Western content will continue to grow, so long as they can continue to combat piracy and collaborate with the government.

Back at the Captain America premiere in Biejing, a sign hung from a little shop across the road from the event: “CD/DVD STORE.” Inside, there were rows and rows of counterfeit DVDs for sale. On a back shelf? Captain America.

Clarification, April 30, 2014:
 The number of years since the large Chinese sites began fighting piracy should be five years, not a few years.