The impassioned views of America's opposing camps on abortion are "irreconcilable", Barack Obama conceded today in a contentious graduation speech at a leading Catholic university that was disrupted by hecklers, protests and arrests.

The president was drawn reluctantly into a confrontation with anti-abortion activists who opposed his end-of-term visit to Indiana's Notre Dame university, but he gave little ground in his support for women's rights to choose. He urged campaigners on both sides of the debate to avoid "demonising" each other.

"No matter how much we may want to fudge it – indeed, while we know that the views of most Americans on the subject are complex and even contradictory – the fact is that at some level, the views of the two camps are irreconcilable," said Obama as he accepted an honorary law degree.

His address to 12,000 students, relatives and teachers at the university's sports arena was interrupted several times by hecklers, one of whom yelled "stop killing our children". Pausing while much of the audience booed the protester, Obama responded: "We're not going to shy away from things that are uncomfortable."

Some of the 1,200-strong class of 2009 decorated their mortar boards with yellow Christian crosses and babies' feet to mark their disapproval of Obama's pro-choice stance and his support for stem cell research. About 10 students walked out during the president's speech and a splinter group boycotted the ceremony, preferring to attend a prayer vigil nearby. But one graduating student, Michael Angulo, scrawled "viva Obama" on his cap, complaining that the furore surrounding the president's visit had been whipped up by political groups outside the university.

Striving for common ground, Obama urged the rival causes to co-operate on issues such as reducing unwanted pregnancies and easing the process of adoption. While engaging in vigorous debate in a "vibrant and varied democracy", he said, they should remain civil while fighting for their causes with "open hearts, open minds, fair-minded words".

"Maybe we won't agree on abortion, but we can still agree that this heart-wrenching decision for any woman is not made casually – it has both moral and spiritual dimensions'," he said. He continued: "Each side will continue to make its case to the public with passion and conviction. But surely we can do so without reducing those with differing views to caricature."

Hundreds of protesters outside the university wielded placards with slogans such as "thou shalt not kill". A small plane flew over the campus pulling an anti-abortion banner and vans in the streets outside carried pictures of aborted foetuses.

Before the speech, police arrested 27 activists for trespassing on Notre Dame's grounds. Some lay down on the lawns, prompting police to carry them away.

Among those held was Norma McCorvey, known as Jane Roe in a landmark 1973 US supreme court case, Roe v Wade, which upheld abortion rights. McCorvey, who has since disavowed abortion, told Fox News: "I'm a peaceful protester, but if they come, they'll just take me away."

Earlier at the weekend, a former Republican presidential candidate, Alan Keyes, was taken into custody, as was an elderly priest, carried off singing "Ave Maria".

A 167-year-old institution founded by French missionaries, Notre Dame has hosted eight previous US presidents as graduation speakers. Obama is not the first to be greeted with protests – Ronald Reagan and George Bush faced opposition over their support for the death penalty. But Obama has angered many alumni by lifting a ban on public funding for charities which support abortion overseas and allowing funding for stem cell research.

A Gallup poll published this week showed most Americans opposing terminations for the first time in 15 years of surveys. Some 51% of respondents described themselves as "pro-life", while 42% considered themselves "pro-choice". Notre Dame's leadership argued that opposition to Obama's presence was largely from alumni or outsiders, with contemporary students overwhelmingly welcoming the president. The university's newspaper said that 73% of letters from students backed the invitation to Obama.