President Obama, soaked to the skin in a driving rain outside Richmond on Saturday, made a populist economic pitch to a cheering crowd undeterred by the downpour and occasional flashes of lightning.

In a half-hour speech interrupted several times by thunderclaps and applause, Obama invoked the American dream and said the election was about two competing visions of how to make it come true.

As the nation continues to rebuild from the economic shocks of 2008, Obama said it has a choice: to pursue policies that he contends will help the middle class and poor move up or return to deregulation, tax cuts for the rich and other policies that he said contributed to the meltdown and would only help the rich.

“Yes, our mission right now is to put people back to work, strengthen housing,” Obama said. “But our purpose is also to rebuild our economy so that it lasts. So that work pays off. So if you are starting a business or punching a clock, you can have confidence that if you work hard, you can get ahead.”

Obama appeared before a crowd of about 900 outside the Walkerton Tavern, a Henrico County historic site believed to have served as a field hospital for Union cavalrymen. Rain aside, the handsome 19th-century brick home, decked out in red-white-and-blue bunting and an enormous flag, was a postcard-perfect setting — one conveniently located in critical swing region.

Like Virginia as a whole, Henrico County has become more racially and socio-economically diverse in recent years, turning reliable Republican country into tossup territory.

“Welcome to blue Henrico!” state Sen. A. Donald McEachin (D-Henrico) declared as the program kicked off.

Obama’s visit came on the second day of his two-day swing through Virginia. He campaigned in Hampton Roads and Roanoke on Friday and headed for a Northern Virginia high school after his Henrico appearance.

One day before Obama came to Henrico, Republican challenger Mitt Romney’s campaign dispatched a high-profile surrogate to the county. Former New York Mayor Rudy Giuliani attended the grand opening of a campaign office there. Pete Snyder, chairman of the GOP’s 2012 Virginia Victory Campaign, told the crowd Friday that Henrico was “the number one battleground in the number one battleground state.”

On Saturday, the first roll of thunder arrived as the Richmond Boys Choir began the program with “The Star-Spangled Banner.” The skies opened as they got to “the home of the brave.” A few dozen in the crowd found shelter in a gazebo, but most stayed put, braving lightning and the sort of soak-’em-to-the-skin downpour that in the Deep South would be called frog strangler. The rain ebbed and flowed throughout Obama’s remarks but did not let up completely until after he left the stage.

“The lightning, the thunder — it didn’t matter; Henrico is for President Obama,” said Carolyn B. Singleton, a Henrico poet.

Obama, smiling broadly, his light blue shirt drenched, made light of the downpour.

“Ladies, I do apologize for your hairdos getting messed up,” he said at one point. “I know this from Michelle.”

Republicans read symbolism into the foul weather, as well as the area designated for overflow parking.

“It’s very fitting given Barack Obama’s disastrous economic policies that when he visits Virginia, his campaign has spectators park in the lots of abandoned and foreclosed homes,” Snyder said. “It’s even more fitting that given the sunshine and promise of hope and change four years ago, that today, Virginia had ominous skies and a downpour for the divide-and-conquer rhetoric of this president.”

Obama spent most of his speech invoking better times in America, back when hard work was all that was required to move up. He invoked his own modest roots as the son of a single mother, recalling family vacations that involved Greyhound bus rides and stays at Howard Johnson motels.

“What makes us special is the idea that in this country, if you are willing to work hard, if you are willing to take responsibility for your own life, then you can make it if you try,” Obama said. “No matter where you come from, no matter what you look like, no matter how modest your beginnings, America has never been a country of handouts. We’re a nation of workers and doers and dreamers and risk takers. We work for what we get. And all we ask for as Americans is that our hard work pays off.”

But Americans have started to see that slip away, Obama said, thanks to GOP-backed policies to deregulate banks and credit-card companies and cut taxes on the wealthy.

“My opponent and his allies in Congress, they believe in top-down economics,” Obama said. “What they’re really saying is tax cuts for the wealthy, roll back the regulations. That’s essentially their plan. That is a plan. That’s a theory. If fits easily on a bumper sticker. But here’s the problem: We tried it. Tried it for a decade before I took office, and it did not work.”

Allie Brandenburger, regional press secretary for Romney for President, countered in a written statement.

“President Obama admitted today that our country isn’t on the right track, yet he is offering more of the same as he seeks a second term,” Brandenburger said. “Americans are tired of the same old broken promises and dishonest attacks — they want a leader who keeps his word and is more focused on fixing the economy than telling stories. As president, Mitt Romney will turn around the upside-down Obama economy and finally get America back on the right track.”

On his way to Henrico, Obama’s motorcade stopped at Berry’s Produce in Hanover County to pick up some tomatoes.

“Let’s see what we’ve got,” he said, greeting owners Bill and Sandra Berry. “I hear the tomatoes are pretty good.”

The owners offered Obama a crash course in how to select the best tomatoes on what turned out to be the day of the Hanover Tomato Festival.

“These are supposed to be the best tomatoes around,” he said, inquiring about soil conditions before leaving with a 25-pound box for home.

Sandra Berry said she was “shocked” when about two hours beforehand, the Secret Service told her the president would be stopping by. Tomatoes weren’t the only thing ripe for the taking at there. The Berrys are undecided voters.