WASHINGTON  The number of times Senator John McCain’s new advertisement attacking Senator Barack Obama for canceling a visit with wounded troops in Germany last week has been shown fully or partly on local, national and cable newscasts: well into the hundreds.

The number of times that spot actually, truly ran as a paid commercial: roughly a dozen.

Result for Mr. McCain: a public relations coup that allowed him to show his toughest campaign advertisement of the year  one widely panned as misleading  to millions of people, largely free, through television news media hungry for political news with arresting visual imagery.

Political campaigns have for years sought to broadcast their ads free by making them intriguing enough to draw wide coverage from news outlets.

And Mr. McCain’s campaign has proved particularly adept at getting such free air time in recent weeks, as news stations endlessly repeat the advertisements, which feature provocative visuals that can fill time during a relative lull in the campaign season.