The problem inside the restroom of a Mexico-bound bus this week wasn’t a smoking passenger, according to U.S. authorities in Texas.

Instead, they said, the problem was nearly $500,000 in cash concealed behind the restroom, wrapped inside 14 bundles.

A dog specially trained by U.S. Customs and Border Protection to sniff out weapons and cash alerted authorities to the potential problem – and investigators took over from there, according to Border Report.

BORDER PATROL AGENTS APPREHEND NEARLY 200 MIGRANTS AT THE BORDER, MORE THAN HALF UNACCOMPANIED CHILDREN

The southbound bus was inspected Tuesday after it reached the port of entry at Presidio, Texas, the report said. First the dog went through the bus, then investigators ran the bus through an X-ray system after the problem was detected.

After the cash was discovered, Homeland Security Investigations agents took into custody two drivers, ages 47 and 68 and both Mexican nationals, according to Border Report.

Six passengers were released after questioning and the bus was impounded, the report said.

CLICK HERE TO GET THE FOX NEWS APP

When crossing a U.S. border – whether by land, air or water -- travelers need to report any amount of cash over $10,000 that they are carrying, federal law states, according to Border Report.

Penalties include possible seizure of the cash as well as criminal charges, if a legitimate purpose for the cash cannot be confirmed, the report said.