The longest known Southwest drug-smuggling tunnel into the United States has been discovered at the Mexican border, officials said Wednesday.

The intricate underground pathway is more than three-quarters of a mile long and features a rail system and an elevator, according to US Customs and Border Protection.

One tunnel entrance is in an industrial area in ­Tijuana, Mexico, and stretches more than 4,300 feet into a San Diego neighborhood, CBP said.

“The sophistication and length of this particular tunnel demonstrates the time-consuming efforts transnational criminal organizations will undertake to facilitate cross-border smuggling,” said Cardell Morant, acting special agent in charge of the Homeland Security Investigations division of Immigration and Customs Enforcement in San Diego.

The passageway, discovered by authorities in August, is about 5½ feet high and 2 feet wide and is an average 70 feet below ground.

In addition to an extensive rail-cart system and an elevator at one tunnel entrance, the passageway is outfitted with a ventilation system, high-voltage power cables and a complex drainage system, CBP said.

Following the tunnel’s discovery, authorities located one entrance about a half-mile west of the Otay Mesa port of entry in San Diego.

That entrance was concealed by a small industrial building.

From there, the feds’ San Diego Tunnel Task Force began mapping the pathway’s route.

The task force is an inter­agency group comprising agents from Border Patrol, Homeland Security, the Drug Enforcement Administration and the local US Attorney’s ­Office.

The tunnel’s US entrance was found covered by several hundred sandbags.

A city block before the San Diego end — at the 3,529-foot mark — the task force found a tunnel branch off the main passageway that extended several feet before coming to an end without reaching the surface.

Sources said that branch may have been abandoned during the original construction.

No arrests or drug seizures have been made in relation to the tunnel discovery, officials said Wednesday.

But Border Patrol Deputy San Diego Sector Chief Agent Aaron Heitke said, “I am confident that our hard work and dedication to uphold the law will lead to future arrests and seizures.”

The tunnel dwarfs the second-longest such passageway discovered in the United States, also found in San Diego, in 2014, and measuring 2,966 feet.

“As efforts to strengthen security on our Southern Border increase, Mexican drug cartels are forced underground to smuggle their deadly drugs into the United States,” said DEA Special Agent in Charge John Callery.

He added, “The sophistication of this tunnel demonstrates the determination and monetary re­sources of the cartels.”

With Wires