President Obama and Mitt Romney clashed repeatedly over foreign policy here Monday night, with the president arguing assertively that Romney has lacked the consistency or clarity of vision to lead the country while the Republican nominee charged that Obama has been weak and ineffective in the face of growing turmoil in the world.

The two candidates differed most sharply over the president’s handling of the uprisings in the Middle East, his efforts to prevent Iran from obtaining nuclear weapons and his treatment of Israel. But often they seemed to find common ground on some of the policies the administration is pursuing.

With the debates over, the two candidates and their campaigns now begin a two-week sprint to Election Day. The campaigns will be focused on a relative handful of states with two objectives: winning over the few remaining undecided voters with a last barrage of television ads and intensifying efforts to get their identified supporters to the polls — either during early voting periods or on Nov. 6.

The focus of the last of their three debates was supposed to be foreign policy, but both Romney and Obama used their time to talk about the issues most important to voters: jobs, the economy and the budget. They talked about the auto bailout, school class sizes and Romney’s tax plan. At several points, CBS’s Bob Schieffer, who served as moderator, tried to bring them back to foreign affairs and national security, but sometimes to no avail.

Romney appeared cautious, especially during the early stages of the debate, but grew more assertive as the evening went on. Throughout the debate, Obama seemed eager and ready to take the fight to his opponent, drawing on his experience to draw contrasts with the challenger. At times, as Romney offered pointed criticism of his policies, Obama glared directly at him.

Romney’s central critique was that Obama had been weak in the face of “a rising tide of chaos” and tumult in the world. When Obama charged that Romney has been “all over the map” in his policies, the challenger responded by saying, “Attacking me is not talking about how we’re going to deal with the challenges that exist in the Middle East.”

But Obama pressed his case that Romney’s worldview as well as his prescriptions for the domestic front were not just wrong but also rooted in the past. “When it comes to our foreign policy, you seem to want to import the foreign policies of the 1980s, just like the social policies of the 1950s and the economic policies of the 1920s,” he said.

Although the two laid out some differences, Romney was less assertive in making distinctions with the president than he has been in some of his more robust and assertive foreign policy speeches along the campaign trail.

The final debate concluded a gripping series of encounters between the two candidates that shook up the campaign as dramatically as any recent series of debates. Romney used the first debate to greatest advantage with an aggressive performance that contrasted to a lackluster evening for the president. Obama rebounded in the second debate, which was marked by sharp and testy exchanges between the two candidates, but not so much as to reverse the gains Romney had made.

The three-week debate period, which included a debate between Vice President Biden and Romney’s running mate, Rep. Paul Ryan (R-Wis.), began with Obama holding a small lead nationally and a bigger lead in some of the battleground states. The debate season ended Monday with national polls showing a dead heat and the battlegrounds increasingly tight.

A new Washington Post-ABC News poll, the start of what will be daily tracking of the presidential race over the final two weeks, showed Obama at 49 percent and Romney at 48 percent. Two weeks ago, the Post-ABC poll had Obama at 49 percent, Romney at 46 percent.

Obama and Romney touched on many of the major areas of tension in the world, from the civil war in Syria to the killings of four Americans in Libya. They discussed the war in Afghanistan and the rise of China. But it was on Iran and Israel where their differences and agreements came through most clearly.

As he has on the campaign trail, Romney focused much of his criticism of Obama’s Middle East policy on his handling of Iran’s nuclear program, warning repeatedly that Iranian leaders have moved “four years closer” to an alleged goal of building a nuclear weapon because the president has not been tough enough to deter them. He contended that Obama’s “apology tour” of Muslim countries during his first year in office, which did not include a stop in Israel, had signaled American weakness.

The president’s actions sent the message to the Iranian mullahs “that, hey, you know, we can keep on pushing along here. We can keep talks going on, but we’re just going to keep on spinning centrifuges,” Romney said. “Now there are some 10,000 centrifuges spinning uranium, preparing to create a nuclear threat to the United States and to the world.”

Romney has used the argument to appeal to Jewish voters, especially here in Florida, who have been critical of the White House’s posture toward Israel’s national security. But Obama, sensitive to the critique, appeared to anticipate the line of attack, referring proactively to his commitment to Israel’s defense.

After Romney pointed out that the president had not stopped in Israel while in office, Obama quickly shot back with a rejoinder, noting he had visited the country as a candidate four years ago and “did not take donors and did not attend fundraisers.” The remark was a rebuke of Romney’s trip to Israel this past summer, which included spending time raising money for his campaign.

Obama pointed out that during his trip in 2008 he visited the Holocaust museum in Yad Vashem to “remind myself the nature of evil and why our bond with Israel will be unbreakable.”

And Obama called the notion of an “apology tour” the “biggest whopper” told during the campaign season, having been discounted by “fact-checkers and reporters.”

“If Israel is attacked, America will stand with Israel,” Obama pledged.

Although the two had argued at last week’s debate about what happened in Libya and whether the administration had been slow to identify the attack as an act of terrorism, the issue never got a full airing on Monday.

At one point, Romney argued that he would not support budget cuts to the military, pointing out that the U.S. Navy had reduced its fleet of warships to the lowest number since the early 1900s.

“Well, Governor, we also have fewer horses and bayonets,” the president countered, “because the nature of our military’s changed. We have these things called aircraft carriers where planes land on them. We have these ships that go underwater, nuclear submarines.”

The competitiveness of the race with just two weeks remaining was underscored by the new Post-ABC News survey showing a statistical tie and by signs that Romney is now running even with Obama in the swing states.

Behind those numbers is a sizable gender gap — as large as it has been in Post-ABC national polling during this campaign. Female voters break 56 to 42 percent for the president; men go 54 to 42 percent for Romney.

White voters side with Romney by a 15-point margin (56 to 41 percent), while non-whites break heavily for the president, 78 to 19 percent. Among African Americans, the margin is overwhelming: 94 to 2 percent.

The seesawing battle for voters now has Obama with the edge on the enthusiasm front: 64 percent of Obama’s backers say they are “very enthusiastic” about his candidacy, higher than the 58 percent of Romney’s who are that engaged behind his run. Still, Obama’s popularity trails his 2008 levels.

The new poll also showed the two candidates at parity in a basic test of popularity: The number of voters with favorable impressions of Romney is on par with the number with positive views of Obama (50 to 52 percent). However, the president maintains the edge in “strongly favorable” ratings.

Obama has a campaign-high 11-point edge over Romney on handling taxes, a 12-point lead on Medicare and a 13-point advantage on “women’s issues.” He has a seven-point edge when it comes to understanding the economic problems people are having and is still widely viewed as doing more to help the middle class than the wealthy, the opposite of how voters see Romney.

In advance of Monday’s debate, the poll showed Romney now rivaling Obama when it comes to dealing with international affairs and terrorism. Romney also runs about evenly with the president as voters’ pick for who is the better commander in chief.

Obama spent the weekend at Camp David preparing for the final debate, arriving in Florida on Monday afternoon. On Tuesday, he will begin a cross-country blitz that will take him to almost every important battleground state, a reflection both of the limited time left before Election Day and the tightening polls, both nationally and in the battlegrounds.

Billed by the campaign as a two-day, non-stop “America Forward tour,’’ Obama is scheduled to barnstorm through Ohio, Florida, Virginia, Iowa, Colorado and Nevada. He will also make a detour Wednesday to California, which is considered safely in his column, for an appearance on NBC’s “The Tonight Show with Jay Leno.”

Romney prepared extensively for the foreign policy debate, coming off the campaign trail on Saturday for three days of prep sessions at a waterfront hotel in nearby Delray Beach, Fla. His top political and policy advisers were with him, as was Sen. Rob Portman of Ohio, who played Obama in the mock debates and has become an increasingly influential adviser to the nominee.

On Tuesday, Romney heads west to reunite with Ryan, staging joint rallies in Nevada and Colorado, and from there, Romney campaigns in Iowa and all-important Ohio. Advisers said Romney would start delivering his closing argument to voters this week, and he is considering making a major speech on debt and government spending in the coming days.

Jerry Markon and Philip Rucker contributed to this report.