Democratic presidential candidate John F. Kerry has discussed the vice presidency with Sen. John McCain (R-Ariz.) on several occasions, the most recent in the past two weeks, informed sources said yesterday. But the conversations have gone nowhere because McCain believes such a bipartisan ticket would not work and could weaken the presidency, they said.

Although Kerry has made no formal offer to McCain to join the Democratic ticket, according to these sources, the purpose of the discussions appears to have been to gauge McCain's interest. McCain's resistance has not wavered, despite his close friendship with the Massachusetts senator, a fellow Vietnam War veteran.

Some Democrats have seen McCain as an ideal choice as Kerry's running mate, as a politician whose presence on the Democratic ticket would shake up the race between Kerry and President Bush, and whose political profile would help Kerry appeal to independent and swing voters and even some Republicans.

Stephanie Cutter, communications director for Kerry, declined to comment on the discussions, which were first reported by the Associated Press's Ron Fournier. "We don't comment on the vice presidential process," she said. "No one is confirming or denying anything. We never confirm or deny speculation like this."

Cutter added later in a statement: "Senator Kerry and Senator McCain are good friends and have spoken during the course of this campaign, including when Kerry called McCain to thank him for standing up and defending Kerry against baseless political attacks."

Mark Salter, McCain's chief of staff, said McCain "has never been offered the vice presidency by anyone."

A knowledgeable Democrat said he was told that Kerry and McCain had talked by telephone on several occasions, but that there had been no formal meetings between the two men for the purpose of exploring the vice presidency. "Kerry offered it in an informal way," said this official, who declined to be identified because of sensitivities about keeping the vice presidential selection process private. This official also said that Kerry and McCain were the only parties to the discussions and that Kerry's vice presidential search director, James Johnson, was not directly involved.

McCain has said publicly on numerous occasions that he believes the idea is a non-starter. However, because of his difficult relationship with Bush, a result of their contentious primary battle in 2000, Democrats have harbored the hope that he might be persuaded to join Kerry in the campaign.

McCain has said he supports Bush and has outlined areas where he and Kerry disagree. In yesterday's Washington Post, McCain noted some of those differences to columnist David Ignatius, including a fundamental difference on how to deal with North Korea and differences over the military's "don't ask, don't tell" policy with regard to gays.

McCain, who is outspoken on all subjects, is concerned that policy differences, if openly discussed in office, would make his role untenable if he were to become vice president under Kerry, leading to a potential conflict that would harm the institution of the presidency.

McCain and Kerry also disagree on abortion -- McCain opposes abortion; Kerry supports abortion rights -- and that issue would have the potential to roil a crucial part of the Democratic base. Despite their friendship, the senators disagree more than they agree on issues, according to those who know them.

It could be advantageous for Kerry to make known his interest, aware that McCain would turn it down, strategists say. Hailing from one of the most liberal states in the nation, Kerry has spent the general-election campaign trying to position himself as a centrist who is strong on national defense and a hawk on deficits, two positions the Bush campaign has repeatedly challenged. Kerry frequently mentions McCain in his stump speech, as a way of putting a bipartisan stamp on his work, and has included images of the two men together in his television ads.

It is unclear how seriously Kerry has considered a unity ticket. Aides described Kerry as intrigued but not committed to the idea, even if McCain were seriously interested, which he has made clear he is not.

Democrats such as Donna Brazile, who managed Al Gore's 2000 campaign, have raised concerns about putting on the ticket a conservative Republican who more often than not votes against Democratic proposals. If Kerry selects McCain, that might drive to Ralph Nader some liberals who are uncomfortable with Kerry's position on Iraq and tax breaks for corporations. Still, Democrats, so far, have shown a strong inclination to do whatever it takes to beat Bush.

A recent CBS News poll showed a Kerry-McCain ticket registering a 14-point advantage over Bush-Cheney among registered voters, 53 percent to 39 percent. Without McCain, Kerry's number dropped. Until Kerry selects his running mate, which a top aide said is likely to happen in the first or second week in July, talk of a bipartisan dream team is unlikely to fade.

In addition to talking about McCain, some Democrats have discussed Sen. Chuck Hagel (R-Neb.), an independent-minded conservative who sometimes clashes with Bush, as a possible Kerry running mate.

Hagel recently told The Washington Post that several Democrats have approached him about running with Kerry, and that he ruled it out unequivocally. At the time, Hagel praised Kerry for considering the idea, but he said he is a committed Republican. Hagel's Senate office was closed yesterday.

Kerry is keeping the selection process secret, but Democrats believe that Rep. Richard A. Gephardt (Mo.), Sen. John Edwards (N.C.) and Iowa Gov. Tom Vilsack are among those who appear to be getting a close look.