An action film bursting with patriotic zeal just broke the Chinese box office.

"Wolf Warrior 2" has raked in 3.5 billion yuan ($520 million) at theaters as of Tuesday, according to Beijing-based movie industry site MTime. That makes it China's highest grossing film to date.

The movie takes place in an unnamed African country, where an elite Chinese soldier ventures into a war zone to save trapped Chinese workers. It's loosely based on several true stories involving military evacuations of Chinese workers from Libya back in 2011 and from Yemen in 2015, according to local media reports.

Related: Box office slump is hurting AMC theaters

With "Captain America" directors Joe and Anthony Russo reported to have consulted on "Wolf Warrior 2," the movie has the look and feel of a typical Hollywood action flick. The difference is it features a Chinese hero saving Chinese citizens.

"People know Tom Cruise and Arnold Schwarzenegger, why don't we have this type of actor representing China?" Wu Jing, the movie's lead actor and director said in comments aired on state-run broadcaster CCTV.

Wu also starred and directed in the first "Wolf Warrior" movie, which was far less popular among domestic moviegoers, pulling in just 545 million yuan ($80 million) in 2015.

The sequel, however, has succeeded in tapping into audiences' patriotism. It premiered just ahead of the 90th anniversary of the founding of the People's Liberation Army.

With the tagline "Whoever offends China will be hunted down and punished wherever they are," the movie was panned as "jingoistic" by RogerEbert.com. The LA Times, however, found its patriotic fervor "bracing."

The closing image of "Wolf Warrior 2" is a Chinese passport with a message scrawled across the back: "The citizens of the People's Republic of China: When you encounter danger overseas, do not give up! Please remember, right behind you, there is a powerful motherland!"

Some moviegoers took to Weibo, China's equivalent of Twitter, to heap praise on the film.

Related: OJ, Netflix and 'Dunkirk': Your summer guide to media and entertainment

"I'm so proud to hold a Chinese passport," wrote one Weibo user. "I have to say this is the first ever real action movie in China," wrote another.

The hashtag "Wolf Warrior 2" has been viewed more than 1.2 billion times on the social media platform.

The movie hauled in ten times as much money at the box office as "The Founding of an Army," a state-backed Chinese film that also doled out a hefty dose of patriotism to coincide with the Chinese military's anniversary.

"Wolf Warrior 2" overtook fantasy flick "The Mermaid," the previous top grossing movie in China.