Prince George's County Fire and EMS spokesman Mark Brady tells WTOP numerous ambulances were sent to the rally after people started fainting and became dizzy.
The problems may have been related to warmer temperatures Thursday. Brady says crowds at the rally were outside and packed shoulder to shoulder.
Two people were taken to the hospital, Brady says. The rest were treated at the scene. A triage area was set up inside the gymnasium at Bowie State.
Obama made the short trip from the nation's capital to neighboring Prince George's County in Maryland in hopes of giving O'Malley, a fellow Democrat, a boost in his rematch with Republican former Gov. Robert Ehrlich. Republicans sensing voter anger are focusing on winning gubernatorial races as well as regaining Congress.
"On Nov. 2, I'm going to need you just as fired up as you were in 2008," Obama told cheering supporters at Bowie State University.
O'Malley also underscored the importance of voter turnout.
"We need each and every one of you," the governor said.
It was a large campus event outside that drew most of Maryland's Democratic congressional delegation to warm up the crowd, including House Majority Leader Steny Hoyer. Tammi Thomas, a spokeswoman for the university, said the school estimated that there were 7,500 to 8,500 people there.
When Obama told the crowd he had hoped Democrats and Republicans could pull together to help fix the recession that he said the Republicans had created, a heckler called out, "You're a liar!" Obama did not seem to notice and carried on.
Maryland Attorney Doug Gansler also underscored the importance of voter turnout to the crowd, and he noted it was no coincidence that the event was being held in heavily Democratic Prince George's County to energize voters.
"If we forget to step up, President Obama is going to be surrounded by Republican governors," Gansler said, alluding to Virginia Gov. Bob McDonnell.
Obama, who praised O'Malley for making big investments in education, told the crowd that the economy is growing again after the recession, but he noted that times are still tough and there is much to be done.
He blamed Republicans for leading the nation into "a ditch," and he said they want to regain power to try and sell the "same old snake oil."
"There's a problem with their approach which is we tried it and it didn't work," Obama said. "It didn't work. Middle class families saw their incomes fall by 5 percent when they were in power."
Maryland Republicans, however, said Maryland is worse off now than it was when O'Malley and Obama took office.
"We need solid leadership to pull us through tough economic times and to bring jobs back to Maryland," Maryland Republican Party head Audrey Scott said. "Sadly Obama and O'Malley's policies have only made matters worse. We deserve better."
Susan Turnbull, the Maryland Democratic Party chairwoman urged the crowd to take part in early voting, which is taking place in Maryland for the first time this year. It begins Oct. 22.
The presiding officers of the Maryland General Assembly, House Speaker Michael Busch and Senate President Thomas V. "Mike" Miller also attended to cheer the governor and his education policies.
"Three words: education, education, education," Miller told the crowd, which included many college students.
EMS personnel treated about three dozen people complaining of dizziness and fainting spells and transported two of them to local hospitals, according to Prince George's County Fire and EMS spokesman Mark Brady. Ralliers were standing shoulder to shoulder in the sun - temperatures were in the 70s - and most of the people experiencing problems were senior citizens, Brady said.
Obama even interrupted his speech to point out that someone in the crowd needed a hand. He jokingly said people should make sure they drink enough water and have enough to eat, particularly when they are coming to listen to a bunch of politicians.
(Copyright 2010 by WTOP and The Associated Press. All Rights Reserved.)