PELLA, Iowa — In one of his most direct confrontations yet with his top rival in the Iowa caucuses, former Vice President Joseph R. Biden Jr. on Thursday called out Senator Bernie Sanders of Vermont for not being a Democrat even as Mr. Sanders makes a competitive run for that party’s presidential nomination, and Mr. Biden also jabbed Mr. Sanders’s record on gun control in among his most detailed remarks on the matter to date.

“I’m a Democrat,” said Mr. Biden, who moments earlier had told reporters at a Dairy Queen here that the contrasts between himself and his top rivals were “self-evident.” Asked to elaborate, Mr. Biden swiped at Mr. Sanders, who represents Vermont as an independent in the Senate. “Well, he says he’s not. He says — you know, he’s not registered as a Democrat, to the best of my knowledge. And Bernie has a different view.”

The remarks, in response to reporters’ questions, capped a day of sparring among the leading Democratic presidential contenders here, four days before the Iowa caucuses. Earlier in the day, Pete Buttigieg escalated his attacks on Mr. Biden as well as Mr. Sanders, taking direct aim at the two leading presidential candidates as he tries to gain ground before the Iowa caucuses. And Mr. Biden, when asked about Mr. Sanders’s record on gun control, directly attacked him for opposing one of the most popular Democratic-backed gun measures in the 1990s, something he had resisted doing in detail as recently as last week.

“I think Bernie has made his verbal amends for his record on guns,” he said in a barely veiled jab. Asked whether that was sufficient, he said, “Well yeah I do, I think he means it. I think that, you know, the fact that he gave the gun manufacturers an exemption that no other, no other industry in the world — in the United States — has, I think he regrets having done that.”