After arriving at the last minute, Mr. Romney thanked his supporters and parade officials, then walked to Mr. Huntsman's section.
"Welcome to New Hampshire," Mr. Romney said, and Mr. Huntsman said the same.
Mr. Romney then gave Mr. Huntsman's wife, Mary Kaye, a hug. He remarked to Mr. Huntsman, who resigned recently as President Barack Obama's ambassador to China, that New Hampshire is nicer than Beijing, then returned to his own supporters.
It was among several Independence Day appearances by Republican presidential candidates.
Mr. Romney has been running for president essentially since he lost his White House bid in 2008, while Mr. Huntsman joined the race only two weeks ago. Both are likely to appeal to similar voters: Both former governors and with a Mormon heritage who lack the sharp, ideological edges of some of the other GOP contenders.