Bowie, Maryland (CNN) -- President Barack Obama interrupted a campaign speech twice on Thursday to seek help for people in the audience who collapsed.
"I think we might have had somebody faint down here, so if we got the paramedics," Obama said about halfway through his remarks under bright afternoon sunshine at Bowie State University. "They'll be all right. Just make sure you give them some space. And if somebody has a bottle of water, you might want to give it to them."
A few minutes later, near the end of his remarks, Obama again noted a member of the crowd in distress.
"Someone up here got a little hot. Let 'em sit down. Let 'em sit down," he said to the audience, asking if there was a bottle of water on stage for the stricken person. "Remember, next time you come out here, eat something and drink something" beforehand, Obama added.
The president was stumping for Maryland Gov. Martin O'Malley, who is seeking re-election.
Prince George's County medical personnel said they responded to a number of sick cases at the university on Thursday.
Fire Department spokesman Mark Brady said that between 1:45 and 2 p.m., about an hour before Obama's speech, ambulance crews stationed at the campus as part of the White House event responded to reports of people "fainting, getting dizzy, and otherwise passing out."
Prince George's County Fire Department officials later told CNN they were treating at least two dozen people at the university for fainting and dehydration.
Brady said that while the temperatures were mild, "in that rally area, the sun is extremely hot."
"In addition, that rally area was extremely crowded and compacted," he said. "You had the rally people shoulder to shoulder, if not closer, and standing for an extended period of time and waiting for the rally to start. A lot of these people that we treated today were senior citizens, so they're probably not accustomed to this type of environment, and those were the people that we found that experienced the fainting, the dizziness issues."
Also, a heckler was heard shouting "You're a liar!" early in Obama's remarks. The man was shouted down by others in the crowd, and it was unclear whether the president heard him.
CNN's Tom Cohen and Vito Maggiolo contributed to this story.