It was the second and final day of what President Obama called his “extravaganza,” a whirlwind tour of eight states, nearly one-fifth of the country, nearly all of them them crucial to his reelection hopes. Locked in a battle with Republican Mitt Romney after a debate season that helped the challenger, Obama went back to the kind of retail politics that has been one of his strengths, complete with the adoring crowds whose cheers and chants seem to feed his energy level.

The nation’s first African American chief executive also made some more history along the way, becoming the first president to vote before Election Day, casting his ballot Thursday afternoon at a community center in his home town of Chicago.

Campaign officials said Obama’s vote was part of a campaign strategy to take advantage of the growing trend of early voting and rally supporters to the polls. “If it’s good enough for the president to vote early, it’s good enough for anyone else in this country,” campaign spokeswoman Jen Psaki said at a Thursday morning rally in Tampa.

These are urgent days for the Obama team. Although the swing-state tour had been planned for weeks, it came at a time when the Romney campaign is claiming greater momentum in the race, and a new Washington Post-ABC News national tracking poll on Thursday showed the challenger with a three-point lead.

Behind the scenes, Obama aides feverishly worked the press corps, rebutting Romney campaign claims and saying repeatedly that they remain confident that the president will win. But in public, the “extravaganza” trip was all about Obama, in the final days of his battle to secure four more years and a historic legacy.

The trip began with the sober ceremony of his office. There were no crowds and no screaming fans as the president’s helicopter touched down at Andrews Air Force Base early Wednesday — just a few snappily dressed military officers.

Obama walked briskly across the tarmac, saluted, jogged up the steps of Air Force One and flew off to Iowa for a morning rally.

The jaunt ended Thursday night at the Cleveland airport in Ohio, perhaps the most critical state of all, among thousands of fans.

In between, Obama also visited Florida, Virginia, Colorado and Nevada, while squeezing in a stop in Los Angeles to appear on “The Tonight Show With Jay Leno.”

En route to Richmond, Obama called former secretary of state Colin L. Powell to thank him for his endorsement , said White House communications director Dan Pfeiffer, who described Powell as “an American hero.” Powell, a Republican who served in both Bush administrations, voted for Obama in 2008.

On Wednesday night, Obama flew from Las Vegas to Tampa and repeatedly bragged that he was “pulling an all-nighter,” a recurring theme over the past couple of days.

“If you’re not going to sleep,” he joked at a rally late Wednesday in Las Vegas (a city whose tourism industry he once famously criticized), “you might as well be in Vegas.”

On Thursday morning, the president arrived in the Sunshine State at 6:43 a.m. and headed to a rally, where he blasted Romney and exhorted voters to grant him a second term. “Don’t boo, vote!” he told supporters.

In Tampa, Obama walked out to blaring music and a shrieking crowd. He smiled, waved and bounded onto a platform under a giant American flag. Each event featured the familiar refrain that Romney suffers from “Romnesia” because he shifts his positions, more attacks on the Republican as favoring the wealthy, and the president’s list of his accomplishments — Osama bin Laden: dead; auto industry: saved; economy: improving.

By his afternoon rally in Richmond, Obama’s voice sounded strained. “You may notice that my voice sounds different, a little hoarse,’’ he told thousands of supporters, who were crammed behind metal barricades in a park. He recited the list of states he had visited and said he was looking forward to voting in Chicago.