Two aquatic tales — one geared for families, the other for scare-seeking teens and adults — helped to buoy the weekend box office, with Disney/Pixar’s Finding Dory retaining the No. 1 spot and the shark-attack thriller The Shallows exceeding expectations in its first weekend to come in fourth.

Finding Dory was expected to finish the weekend with an estimated $73.2 million, bringing its domestic haul to $286.6 million after two weekends of release. The animated sequel to Finding Nemo has so far brought in $396.9 million worldwide.

Independence Day: Resurgence landed its first weekend with about $41.6 million, near the low end of estimates. Fox’s sequel to its 1996 sci-fi blockbuster cost an estimated $165 million to make and faced largely negative reviews.

But the Roland Emmerich movie could get better traction in overseas markets, including China, where it has already opened.

Fox was expecting Resurgence to earn $102 million overseas over the weekend, to bring its global haul to $143.6 million.

“I think we’ll be in good shape on the movie at the end of the day,” said Chris Aronson, president of domestic distribution at 20th Century Fox. “It’s an expensive movie, and it underperformed a little domestically, but it had a good start.”

He said the movie has been released in 70 percent of its international markets.

The original Independence Day earned about $50.2 million domestically on its opening weekend.

Reaching for sleeper status, The Shallows brought in an estimated $16.7 million on its opening weekend, beating industry expectations by about two-fold.

The thriller, released by Columbia Pictures, stars Blake Lively as a surfer who comes under attack by sharks. It cost $17 million to make, according to Sony.

“It was crafted creatively to be done on a modest budget, but yet (they) put out a story that was going to grab audiences. It had a tremendous amount of social media outreach,” said Rory Bruer, president of worldwide distribution at Sony Pictures.

The weekend’s remaining new general release was the Civil War drama Free State of Jones, staring Matthew McConaughey. The STX release grossed $7.8 million to finish in fifth place.

“While we were expecting a stronger performance, we couldn’t be prouder of the film, the filmmakers or the talent involved,” a spokesman for STX said in a statement. He said the movie played strongest in the South.