This phrase is a transformed version of 'Namu Daishi henjo kongo,' a gohogo for Kukai (a phrase praising Kukai), although the content of the phrase has become different from what was meant by the original one.
本来の字義からは離れてしまっているが、空海の御宝号「南無大師遍照金剛（なむだいしへんじょうこんごう）」が転訛したもの。