MEXICO CITY — When Bogart crossed the border back in 1948, seeking the treasure of the Sierra Madre, he became one of the first gringos to see there was treasure all around. Mexico’s scenic beauty and cheap but skilled work force made the United States’ southern neighbor a plum location, and Bogie’s director John Huston returned with his cameras several times.

Now, after four or five years of virtually ignoring the country, U.S., European and Australian filmmakers are discovering Mexico all over again.

The country that hosted such dollar-heavy pics as “Dune” and “Rambo” in the ’80s was somewhat ostracized in the early ’90s by producers fed up with being taken for a ride. They resented being overcharged for labor, bullied by bureaucrats, underserved by support services and dogged by censors. Cheap locations in East Europe and Asia drew them away.

But that’s all changing. Right now in Mexico you can find Antonio Banderas and Anthony Hopkins crossing swords in Martin Campbell’s “The Mask of Zorro,” Leonardo DiCaprio and Kate Winslet splashing in the world’s largest water tank for James Cameron’s “Titanic,” and several smaller projects including pics from John Sayles and Philip Haas.

The number of foreign features shot or partly shot here grew from seven in 1995 to 13 last year. Early indications imply yet greater activity in 1997 — six films began lensing here in January alone.

The reasons for this growth are structural, not cosmetic. The creation of a National Film Commission, more flexible labor and the building of new facilities are wooing projects south of the border — as is the cheaper peso, heavily devalued in 1994 and 1995. When combined with the country’s natural riches and proximity to Los Angeles, these factors make the Mexican location biz a sure bet for growth.

Much of the buzz over filming here has come from the $130 million “Titanic” and the purpose-built facility that Fox constructed for the pic in Rosarito, a 45-minute drive from the San Diego airport. On a 40-acre beachfront lot, the company built three soundstages, offices, workshops, dressing rooms and other support structures.

But what makes the site unique are its water tanks: an interior tank of 5 million gallons and an exterior tank, with an uninterrupted vista of the Pacific Ocean, holding a world-record 17 million gallons. Most of this permanent studio went up in three months last summer.

Simon Bax, chief financial officer at Fox Filmed Entertainment, was closely involved in the global search for “Titanic’s” location. Bax recalls that once Fox had found no existing facility would suffice, Mexico soon became an option as to where to build a new studio.

“Rosarito is relatively close to L.A., and there’s the weather and the location on the water,” Bax says, also citing the affordability of the land.

Construction was relatively cheap. Bax won’t reveal the total outlay, but says the cost of all the concrete poured — factoring in labor — was less than the raw material alone would have cost in the U.S.

Bax reckons the site will be in steady demand from producers once “Titanic” wraps there in March. “Four productions (three from outside Fox) are interested already. I’d hope for the facility to pay back in less than 10 years,” he says.

Rosarito’s exterior tank certainly would have saved Universal a few bucks on “Waterworld,” but what about the rest of the studio? “Titanic” producer John Landau calls it a unique filming environment. “Actors are accommodated in 26 separate suites,” he says, “and the fact that they’re all in one building instead of separate trailers has contributed to a great camaraderie.”

Nightlife in Rosarito may be limited, but L.A. is close enough for cast members to slip home when not on call. Such proximity keeps production costs down as well: “If we don’t want to use a crane for a week, we can send it back to L.A.,” Landau says.

Overall, Landau estimates running costs are “at least 20% cheaper” than in the U.S., a claim echoed by top Spanish producer Andres Vicente Gomez, who came here last year with “Perdita Durango,” starring Rosie Perez and Javier Bardem. Overall, shooting in Mexico may be 25% cheaper than in Spain, he says.

Much of the saving in Mexico comes from labor, especially extras and set builders. Reportedly, some 500 Mexicans were contracted to work on “Titanic.” Landau admits there have been injuries, both in construction and stunt-related, but says that’s not unusual given the man-hours involved.

The producer adds: “Some crew members in the U.S. were hesitant about how much local infrastructure they could rely upon down here. But now that they’ve worked here, they’re saying Rosarito’s going to become a filming mecca.”

Having also worked on “Honey, I Shrunk the Kids,” which shot in Mexico City in 1988, Landau says Mexico is now a much easier work environment. Customs and immigration procedures benefit from clearer avenues of command, and unions are more cooperative.

His findings are echoed by other return visitors. The Mexican-born Hool brothers, Conrad and Lance, have been producing pics here since the 1970s — recently the Tom Arnold starrer “McHale’s Navy” — and Conrad says union-levied displacement fees are much lighter than several years ago.

“The actors’ union ANDA used to be very pedantic, but under Humberto Elizondo it’s become more friendly,” Hool adds, referring to the org’s president.

“The skills of Mexican crews have reached an international standard. Technicians are often foreign-trained now,” adds Jose Ludlow, who owns production company Kinema Films. Ludlow also runs a facility catering to low-budget U.S. actioners, surrounded by 20 acres of jungle near Puerto Vallarta.

Hool says there’s room for improvement. Bringing guns into Mexico for actioners and Westerns requires permits from the army that often take an unreasonably long time to process. Customs agents are easier to deal with, he adds, but tariffs on equipment and wardrobes are still too vaguely defined. Indeed, the producers of “Zorro” were last month frustrated by customs agents when a host of items was held for nine days. These included such vital props as the (dangerously plastic) blade of Zorro himself.

Lobbying to make customs operate more efficiently is one of the priorities of Mexico’s National Film Commission (CNF), says topper Jorge Santoyo. Dispensing free advice, the CNF was set up in 1995 at the newly refurbished Churubusco Studios (where “Zorro” is now filming), and Santoyo has been praised for quickly building the org into a multifaceted bureau.

“In our first year we provided information to 234 projects, of which 67 were features, 59 commercials and 26 TV programs. About 75% were foreign or co-productions,” Santoyo says.

In its second year, the CNF has gotten busier, now fielding up to 44 requests per month. Santoyo estimates that, given the past correlation between queries submitted and films getting made, some 20 foreign features may shoot in Mexico this year.

Santoyo’s team also has helped create six state film commissions around the country, bringing the total to 16. Launched in January, Mexico’s newest state commission is Guanajuato’s, run out of San Miguel de Allende by U.S. expat Sarah Gonzalez.

This commission is a hybrid operation, funded by the state but largely run by Quetzal Films, a production and services company. Quetzal has been courting producers at Disney. “They’re really psyched about Mexico, and they did lots of scouting last summer,” Gonzalez reports.

Like many states, Guanajuato boasts much more than the cactus-and-rock-strewn desert of Mexican movie lore. The colonial capital could easily double for a European town from the 1500s to the present day, while the tunnels under the city hosted Arnold Schwarzenegger in 1989’s Mars-set “Total Recall.”

Diversity, as much as cost, may be Mexico’s strongest suit. Conrad Hool once made a movie in the mountains of northwestern Mexico where the locale doubled for Canada. Central Mexican towns re-created Colombia in “Romancing the Stone” and “Clear and Present Danger.” Southern jungles have several times passed for the Brazilian Amazon, as in the Sean Connery starrer “Medicine Man.”

But the most inspired location work here took shape last year in Baz Luhrmann’s “William Shakespeare’s Romeo & Juliet,” shot largely in Mexico City. The Oz director’s otherworldly “Verona Beach” setting — mixing elements of Miami hip, Las Vegas kitsch and Latin color — owed much to the capital’s bizarre mix of architectural styles, its decorative penchant for neon and other elements unlikely to be identified by outsiders as typically Mexican.