Rick Santorum was booed after a lengthy back-and-forth with several students in Concord, N.H., on the issue of same-sex marriage, which is legal in New Hampshire.

As Santorum addressed a group of college students, one asked him how same-sex marriage affects him personally and why not have legal same-sex marriage as long as it's not religious in nature.

Santorum answered that for "230 years marriage has been between one man and woman. So if you want to change the law … you have to make the positive argument about why."

At that point, several members of the audience started trying to engage the candidate.

Santorum said, "We're not shouting out here," before asking the students to raise their hands.

He called on a woman who asked, "How about the idea that all men are created equal, rights to happiness and liberty?

Santorum responded, "Are we saying that everyone should have the right to marry?"

Several members of the crowd loudly yelled, "Yes!"

At that point, the former senator from Pennsylvania compared same-sex marriage to polygamy.

"So anyone can marry can marry anybody else? So if that's the case, then everyone can marry several people … so you can be married to five people. Is that OK?" Santorum asked.

"Not what she's asking!," another student yelled.

Santorum answered, "Wait, wait, I'm asking her. You said everyone has their right to their own happiness."

The crowd clapped as Santorum got prickly and said, "I'm happy to engage … but we have to have a civil discussion or we will move on to the next question. My question to you is: People should be allowed to do whatever makes them happy?"

The student answered that they should as long as no one was harming anyone else. Santorum countered, raising his voice and asking, "Who decides if they are harming other people? Is there an objective standard?"

The student told the candidate, "It's morally right for two men to have the same rights as a man and woman."

Santorum again compared same-sex marriage to polygamy, clearly annoyed at the continued back and forth.

"What about three men?" he asked.

The student angrily answered, "That's not what we are talking about!"

Santorum continued, but threatened to end the discussion, telling the crowd, "I'm going to give people one more chance and then we are going to move on. I'm going to ask the question again. If three people happen to get married based on what you just said, what makes that wrong and what you said right?"

"That's irrelevant," the student responded. "My personal opinion is, 'Yeah go for it,' but what I'm asking [is] for you [to] justify your belief and your high morals about all men created equal-"

At that point, Santorum cut off the student and, for the third time, asked, "What about three men?"

"That's not what I'm talking about," the student answered. "I'm talking about the basic right that you have with another woman."

He then told the crowd that he wanted to "have a discussion about what that means … that marriage really means whatever you want it to mean."

"I believe we're made that way. God made men and woman to keep civilization and provide the best environment to raise children," Santorum said. "I have no problem if people want to have relationships, but marriage provides a good to society. It's unique because it is the union that causes children to be raised."

Santorum added that "every child in America deserves" to know their mother and father.

"We deny children that birthright, then I think we are harming kids and society and not promoting what's best," Santorum added, before moving on to the next question.

When he wrapped up, several questions later, the crowd loudly booed him.

ANALYSIS: Santorum Struggles to Transition to Major Candidate