MENOMONEE FALLS — President Barack Obama came to Wisconsin on Monday to promote “green” business — and to bring in cash for Democratic candidate for governor and Milwaukee Mayor Tom Barrett.

Obama took an optimistic tone during his visit, both when he spoke at a Menomonee Falls clean energy company, renewable battery manufacturer ZBB Energy Corp., and at a fundraiser for Barrett in Milwaukee.

“And the reason I’m here today is because at this plant you’re doing more than just making high-tech batteries,” Obama told a small crowd of ZBB workers. “You’re pointing the country towards a brighter economic future.”

The president’s visit served another purpose, reportedly raising several hundred thousand dollars for Barrett’s campaign.

Flying thousands of miles to reap millions of dollars, Obama is dashing across the country to help his party retain power, essentially offering one familiar argument: Republicans don’t solve problems.

“Don’t give in to fear,” Obama said Monday in his latest vision of a country led by the opposition party. “Let’s reach for hope.”

Obama has settled on his message for the pivotal midterm elections, which means what he said Monday in Milwaukee will sound like what he says today in Seattle and Wednesday in Miami. He is covering more than 8,000 miles in three days, the kind of personal attention that gets donors to the door.

At the Milwaukee fundraiser at the U.S. Cellular Arena, Obama praised Barrett’s work to create jobs and promote economic development in places such as the Menomonee Valley. He also spoke of Barrett stepping in to help a woman and her grandchild after hearing cries for help near the Wisconsin State Fair last year, and the beating he suffered as a result. The incident left him with serious injuries to his face and hand.

“That’s the kind of act you don’t hear about every day,” Obama said. “He stepped in, tried to help and sustained serious injuries. That’s what counts as a leader. That’s a mark of real character. That’s a person who will fight for you each and every day.”

Barrett’s opponents said both he and Obama are out of touch with what people in the state want.

Republican candidate Mark Neumann said Obama’s policies aren’t working, adding the president’s visit “ties Tom Barrett to the same policies.”

Whether Obama’s visit links the two men, it certainly boosted Barrett’s campaign coffers. There were conflicting estimates of how many people paid to get into the $250-per-plate fundraiser, but a Barrett spokesman said 1,300 people bought tickets to the event, and it was oversold. A media pool report estimated about $325,000 was raised.

And Scott Walker, Milwaukee County executive and Republican candidate for governor, said he suspects the money will be spent on attack advertisements.

“Every penny that was raised today will be used to attack me,” Walker said.

Walker said Obama’s visit shows the president is worried about Barrett’s campaign. On Monday afternoon, Walker held a rally against the $810 million passenger rail project for Wisconsin that he and other Republicans have labeled a boondoggle. He says the money should be used on infrastructure such as roads and bridges, and said the train is “symbolic of the runaway spending” backed by Obama, Barrett, and Gov. Jim Doyle.

Reince Priebus, chairman of the Republican Party of Wisconsin, also linked the three Democrats and called Obama “the kiss of death” for candidates like Barrett.

But Phil Walzak, a Barrett campaign spokesman, said Obama’s visit shows energy and enthusiasm among supporters and “how well we’re doing.”

“This campaign is well positioned to win,” he said.

Graeme Zielinski, a spokesman for the state Democratic Party, said Monday was a bad day for Barrett’s opponents.

“I think the Obama team has shown they know how to win elections,” he said.

State Rep. Mark Pocan, D-Madison, acknowledged the candidates for governor are in a close race. But he added the president wouldn’t come to Wisconsin if he didn’t think Barrett could win.

“Obama is probably not going to do a fundraiser in Utah,” Pocan said.

— The Associated Press contributed to this report.