Rick Santorum on Wednesday responded to attacks in Michigan from allies of Mitt Romney by unveiling a humorous television ad that portrays Mr. Romney as a Rambo-style commando wielding an automatic weapon that shoots splatters of mud at his opponents.

The ad is Mr. Santorum’s first serious attempt to deflect what aides anticipate will be a barrage of negative attacks during the next two weeks as Mr. Santorum and Mr. Romney campaign in Michigan ahead of the state’s Feb. 28 primary.

Those attacks began late on Tuesday when a “Super PAC” backing Mr. Romney released an ad alleging big government spending by Mr. Santorum while he served as a U.S. senator from Pennsylvania. Restore Our Future, the group behind the ad, has said it will spend at least $460,000 in Michigan during the next two weeks.

Mr. Santorum’s campaign has struggled to raise the millions of dollars he needs to compete with Mr. Romney and his allies. And it is unclear how much money he is spending to counter the super PAC attacks. But Mr. Santorum is clearly hoping to generate buzz — and free publicity — with the humorous new ad, titled “Rombo.”