Republican John McCain on Friday defended his campaign’s new Web ad mocking Barack Obama as a presumptuous messianic figure, saying it was important to “display a sense of humor” in the presidential contest.

The ad was not set to air on any television stations, so the campaign was counting on it to attract viewers by circulating broadly on the Web. Still, it was McCain’s latest attempt to caricature his rival as an overweening but empty media phenomenon, coming on the heels of the campaign’s new television ad juxtaposing Obama with lightweight celebrities Britney Spears and Paris Hilton.

Obama spokesman Hari Sevugan slammed the Web ad, saying the Arizona senator was “spending all of his time and the powerful platform he has on these sorts of juvenile antics.”

McCain also reiterated his contention that Obama had injected race into the campaign, a day after McCain’s campaign manager accused the Illinois senator of “playing the race card” by suggesting Republicans were trying to scare voters away from Obama because he “doesn’t look like all those other presidents on the dollar bills.”

“I didn’t bring up the issue. Senator Obama did,” McCain insisted.