Authorities uncovered a tunnel outfitted with solar panels, lighting, ventilation and a rail system that could carry illegal immigrants, arms dealers and drug smugglers from Mexico into the United States, U.S. Customs and Border Protection officials said this week.

Authorities made the discovery in mid-September and said the tunnel’s entrance, in Baja California, Mexico, was just 221 feet south of the U.S. border. The entry shaft was about 31 feet deep.

“Sophisticated tunnels take a lot of time and money to make,” Border Patrol Agent Tekae Michael told the San Diego Union-Tribune. He said the tunnel was most likely built for drug smuggling. “When we find them, they’re a pretty big deal.”

To exit the tunnel, smugglers needed to climb up a 15-foot shaft near Jacumba, California, officials said. (U.S. Customs and Border Patrol)

To exit the tunnel, smugglers needed to climb up a 15-foot shaft near Jacumba, California, officials said. The tunnel was about 3 feet tall and 2 1/2 feet wide. It was 627 feet long -- 336 feet of which were in U.S. territory.

“Agents reported that there was a solar panel system used to run the electrical, lighting and ventilation systems that were in the tunnel,” officials said in a news release. "There were also two sump-pump systems within the tunnel to pump out any water that gathered...Agents also reported that a rail system was installed that ran the entire length of the tunnel.”

Border officials said tunnels are often filled after authorities complete their investigation to prevent smugglers from gaining access.

The tunnel included a rail system. (U.S. Customs and Border Patrol)