WASHINGTON — Even as they campaign on their differences, John McCain and Barack Obama have been quietly recalibrating their messages on foreign policy in ways that often have moved them closer to the political center -- and to each other.
The Republican and Democratic nominees, scheduled to meet in a kickoff presidential debate tonight if differences are resolved, hold decidedly differing outlooks on foreign affairs. McCain has stressed his readiness to confront adversaries; Obama has emphasized engagement and negotiation.
But on a striking list of particulars -- including Russia, Afghanistan, Iraq -- their differences have narrowed as election day has approached.
In part, the migration reflects the complexity of this year's national security issues, knotty problems that have defied solutions proposed by partisans on the left or right.
But the shift also reflects how the candidates are increasingly focusing on uncommitted voters.
"Everybody's trying to grab the same voters in the middle," said a Democratic strategist who was not authorized to speak for the Obama campaign and did not want to be identified. "They're reading the same polls and competing for the same voters."
McCain has also been tweaking his course to look like a strong commander in chief, but not one who might entangle the nation in unwanted wars. Polls show that voters want to avoid unnecessary military commitments, which are associated with President Bush.
Advisors and allies on each side insist that the other candidate has shifted more.
But it is clear that each is making adjustments.
Take Russia. McCain greeted Russia's Aug. 7 invasion of Georgia with fiery denunciations of Moscow. Obama called for restraint and avoided assigning blame.
But within days, Obama became more and more critical of Russia.
McCain, meanwhile, began to sound some conciliatory notes at key moments. In his Sept. 4 speech accepting the Republican nomination, he promised, "As president, I'll work to establish good relations with Russia so that we need not fear a return to the Cold War."
From the beginning of the presidential campaign, the two candidates have held similar views on issues such as North Korea, expansion of the U.S. military and the treatment of suspected terrorists. They have moved closer on how to deal with Russia and Iran, on a proposed strategic alliance with India, and even on the U.S. troop buildup in Iraq.
As recently as July, McCain was arguing that the deepening insurgent threat in Afghanistan was not a result of a lack of U.S. troops, but of Pakistan's unwillingness to properly patrol its border and deny militants a haven. But on July 15, McCain echoed Obama's call for more troops. Thanks to success in Iraq, McCain said, it now was possible to send extra brigades to Afghanistan.
Obama, who built his campaign partly on his opposition to the Iraq war, has continued to modify his views on the conflict as polls that Americans view the troop buildup and even the war itself more positively. He said this month that the surge, which he opposed, had "succeeded beyond our wildest dreams." However, he has emphasized that in his view, the buildup has not met its ultimate goal of political reconciliation among Iraqis.
Regarding India, Obama has long had serious reservations about the proposed U.S.-India civilian nuclear agreement, aimed at cementing their alliance. Critics of the proposal on both the left and right worry that the agreement would weaken international attempts to limit the spread of nuclear weapons by permitting nuclear trade with a country that developed its own nuclear bomb.
In 2006, Obama voted for amendments that threatened to upset the deal. But this month Obama signaled that he favored it and said that as president, he would work for it.
McCain, for his part, has put distance between himself and his proposal for a "league of democracies." The idea was a hit among neoconservative supporters when McCain introduced it last year as a formal organization that could use military and economic power when the United Nations and other groups failed to act.
Last spring, McCain revised his plan, saying it would be an ad hoc coalition that wouldn't use military force. Nowadays, he rarely mentions it. Some analysts think McCain has tempered his message in response to signs of an inward-looking mood among voters.
Paul J. Saunders, executive director of the Nixon Center think tank and a former Bush administration official, said the candidates had shifted toward each other in part to appeal to voters in the political center and in part because many challenges defy solutions.
But another factor, he said, is that a candidate who veers from conventional approaches risks criticism.
Obama was denounced for proposing direct talks with Iranian leaders, and later adjusted his position, saying he would conduct top-level talks only after appropriate preliminary discussions and only if they served U.S. interests.
"As a rule I think our presidential candidates are punished for anything that veers too far from the conventional wisdom," Saunders said.