"If either Senator Clinton or Senator Obama is elected president, the rights of law-abiding gun owners will be at risk my friends - and have no doubt about it," the Republican nominee-in-waiting told a crowd of several thousand.
McCain acknowledged he has been no darling of gun-rights advocates, having pushed through signature campaign finance legislation gun supporters say has muzzled free speech. The Arizona senator has also favored tighter restrictions for buying guns at gun shows.
Nonetheless, McCain said he expected the votes of gun owners in his general election campaign against either Obama or Clinton, the remaining Democratic presidential contenders.
"I supported campaign finance reform because I strongly believed our system of financial campaigns was influencing elected officials to put the interests of `soft money' ahead of the public interest," the senator said to silence. Softmoney is unlimited contributions from wealthy individuals corporations or unions.
"It is neither my purpose nor the purpose of the legislation to prevent gun owners or any other group of citizens from making their voices heard in the legislative process," he said.
"Those disagreements do not detract from my long record of support for the Second Amendment and the work we have done together to protect the rights of gun owners ...," he added.
Earlier, after visiting a gun store in St. Albans, W.Va., when he bought only a rod, bobbers and other fishing equipment, McCain said the only gun controls he favors are limits to keep guns from people with criminal backgrounds or indications of mental problems.
He added that, as president, he would sign a law that prohibited individuals from buying guns at a gun show without going through the same checks as those buying guns at regular stores.
McCain's visit to West Virginia, a general election battleground state, and his appearance at an NRA convention in Kentucky, were aimed at assuring gun owners a McCain administration would not infringe upon their rights.
In isolation, the questions about McCain's gun record could be troubling to a candidate vying for the votes of conservatives, former members of the military and residents in the South, where guns and hunting are prominent elements of the culture.
Yet in comparison to his potential Democratic rivals, McCain could be viewed as the most supportive of gun rights.
He told the NRA that Democrats have learned since the 2000 election between Al Gore and George Bush not to talk about gun control. He jabbed repeatedly at Obama, the Illinois senator who leads the Democratic delegate count, including deriding him for a recent comment about Pennsylvanians "clinging to guns and religion" amid economic stress.
Clinton also criticized Obama for the remark, prompting Obama to accuse the former first lady "like she's on the duck blind every Sunday, packin' a six-shooter!"
As the NRA audience laughed, McCain said: "Someone should tell Senator Obama that ducks are usually hunted with shotguns."
Obama spoke to reporters Friday in Watertown, S.D., and was asked about gun rights and whether Republicans would make it an issue in the general election campaign.
"They'll try, of course. They've got the same playbook in every election and guns is going to be one of those issues," the Illinois senator said. Describing his position, Obama said, "People have the right to lawfully bear arms. There's nothing inconsistent with also saying we can institute some common-sense gun laws so that we don't have kids being shot on the streets of cities like Chicago. Those are laws that I think a majority of Americans believe in."
Clinton, a senator from New York, made stricter gun control one of the themes of her first Senate campaign in 2000.
Also addressing the crowd of thousands was former GOP presidential candidate Mitt Romney. Last year, Romney sought the support of gun owners by declaring himself a lifelong hunter, only to later step back and recast himself as a sporadic opponent of "small varmints." Romney assured the crowd that despite any differences they have with McCain, "I believe that he's right on issue after issue that counts."