Mattis -- whose own nickname is "Mad Dog" -- seemed impressed by the show, which also saw police dogs leaping from helicopters to attack "terrorists".
To the sound of beating drums and with their faces daubed with camouflage, the elite soldiers launched a wild martial arts display as they demolished wood and brick obstacles with kicks, punches and headbutts.
The dumbfounded US delegation looked on as the men then killed live snakes, including cobras, and served their blood to each other in a sign of brotherhood. One fighter even tore apart a snake with his teeth.
Nearby, a commando rolled around on broken glass while another shot apparently live bullets at a balloon held by his blindfolded comrade -- with one round missing the target, although no one was injured.
An aerial display accompanied to the "Mission Impossible" theme tune saw soldiers launch themselves from helicopters together with dogs to stage a mock manhunt for a pair of "terrorists".
"As you see, the dogs beat the terrorist," a satisfied military official said following the show at Indonesia's army headquarters to round of the US defence secretary's visit.
Mattis, whose next stop on his Asian tour was Vietnam, said: "Even the dogs coming out of those helicopters knew what to do when confronting the terrorist."
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.