To lure the Foo Fighters to his hometown, Cesena, in northern Italy, Fabio Zaffagnini organized 1,000 musicians to play one of their hit songs, recording a video that was widely shared online in July.

It caught the band’s attention, and Dave Grohl, the frontman, promised to visit. On Monday, the Italian town got its wish.

“The whole world saw what you did,” Mr. Grohl said at the concert, which was not originally scheduled on the band’s current European tour. “Millions and millions of people saw what you did. It’s a beautiful thing.”