TUCSON — Drug smugglers parked a car transport trailer against the Mexican side of the border one day in December, dropped a ramp over the security fence, and drove two pickup trucks filled with marijuana onto Arizona soil.

As Border Patrol agents gave chase, a third truck appeared on the Mexican side and gunmen sprayed machine-gun fire over the fence at the agents. Smugglers in the first vehicles torched one truck and abandoned the other, with $1 million worth of marijuana still in the truck bed. Then they vaulted back over the barrier into Mexico’s Sonora state.

Despite huge enforcement actions on both sides of the Southwest border, the Mexican marijuana trade is more robust — and brazen — than ever, law enforcement officials say. Mexican drug cartels routinely transported industrial-size loads of marijuana in 2008, excavating new tunnels and adopting tactics like ramp-assisted smuggling to get their cargoes across undetected.

But these are not the only new tactics: the cartels are also increasingly planting marijuana crops inside the United States in a major strategy shift to avoid the border altogether, officials said. Last year, drug enforcement authorities confiscated record amounts of high potency plants from Miami to San Diego, and even from vineyards leased by cartels in Washington State. Mexican drug traffickers have also moved into hydroponic marijuana production — cannabis grown indoors without soil and nourished with sunlamps — challenging Asian networks and smaller, individual growers here.