Hampden-Sydney College, an all-male school in central Virginia, is investigating an election-night incident in which a group of students upset about President Obama’s reelection set off fireworks, threw bottles and then shouted racial epithets at members of a minority student organization, officials said Thursday.

Some in the group also threatened violence against the Minority Student Union members, college officials said, but there was no physical contact. Officials said about 40 students were involved, but it was unclear how many were active and how many were bystanders.

“I am terribly disappointed with the students who participated in this harmful, senseless episode including those men who stood idly by and watched it happen,” college President Christopher B. Howard wrote in a statement addressed to the Hampden-Sydney community. “There is no place for bigotry or racism of any kind on this campus.”

The incident at Hampden-Sydney, a private liberal arts college in Prince Edward County, occurred as another racially charged episode was unfolding at the University of Mississippi. There, the Daily Mississippian student newspaper reported, hundreds of students “exchanged racial epithets and violent, politicized chants” about midnight as the nation learned that its first black president had been reelected.

At Hampden-Sydney, about 300 people attended a forum Wednesday to address the incident. “We were all impressed with the number of students who stood up and condemned this,” said college spokesman Thomas Shomo.

Howard, who took office in July 2009, is the first African American president of Hampden-Sydney. Federal data show that 8 percent of its students are black and 83 percent are white.

The 1,080-student school, founded in 1775, is one of a handful of all-male colleges left in the United States. Among its former students were the ninth U.S. president, William Henry Harrison, and television comedian Stephen Colbert, who attended the school before later graduating from Northwestern University.

Shomo said the 40 students involved in the incident coalesced on the school grounds after television networks announced that Obama had defeated Republican Mitt Romney. The group of students walked over to a lawn outside the Minority Student Union house, he said, where some threw bottles and set off fireworks. Shomo said, however, that the bottles apparently were not directed at any person or building. When some students started shouting racial slurs and threats, Shomo said, members of the minority student group called campus security.

No physical blows were exchanged, he said. The incident lasted less than 45 minutes. Howard himself went to the scene soon afterward to talk with students about what had happened.

The college, which posted a statement on the matter on its Facebook page, is investigating the incident. Shomo said students could face punishment for violation of the school’s code of conduct. According to the college’s Web site: “The Hampden-Sydney student will behave as a gentleman at all times and in all places.”

Staff writer Jenna Johnson contributed to this report.