ANN ARBOR, Mich. - In a blunt caution to political friend and foe, President Obama said Saturday that partisan rants and name-calling under the guise of legitimate discourse pose a serious danger to America's democracy, and may incite "extreme elements" to violence.

The comments, in a graduation speech at the University of Michigan's football stadium, were Obama's most direct take about the angry politics that have engulfed his presidency after long clashes over health care, taxes, and the role of government.

Not 50 miles from where Obama spoke, the GOP's 2008 vice presidential nominee, Sarah Palin, denounced his policies as "big government" strategies being imposed on average Americans. "The fundamental transformation of America is not what we all bargained for," she told 2,000 activists at a forum in Clarkston, sponsored by the antitax Americans for Prosperity Foundation.

Obama drew repeated cheers from a friendly crowd that aides called the biggest audience of his presidency since the inauguration. The venue has a capacity of 106,201, and university officials distributed 80,000 tickets - before they ran out.

In his 31-minute speech, Obama didn't mention either Palin or the tea party movement that's captured headlines with its fierce attacks on his policies. But he took direct aim at the antigovernment language so prevalent today.

"What troubles me is when I hear people say that all of government is inherently bad," Obama said after receiving an honorary doctor of laws degree. "When our government is spoken of as some menacing, threatening foreign entity, it ignores the fact that in our democracy, government is us."

Government, he said, is the roads we drive on and the speed limits that keep us safe. It's the men and women in the military, the inspectors in our mines, the pioneering researchers in public universities.

The financial meltdown dramatically showed the dangers of too little government, he said, "when a lack of accountability on Wall Street nearly led to the collapse of our entire economy."

Also Saturday, in his weekly radio and Internet address, Obama pressed Congress for swift action on measures to restrict political advertising by corporations and labor unions, saying that "no less than the integrity of our democracy" is at stake.

Legislation introduced in Congress last week would require that corporations and unions identify themselves in political ads they pay for and that the chief executive or other top official state: "I approve this message."

The measures are in response to a 5-4 Supreme Court ruling in January that upheld the First Amendment rights of these groups to spend money on campaign ads, thus enhancing their ability to influence federal elections.

Obama slammed the decision at the time, saying the court had given a "green light to a new stampede of special-interest money in our politics" and pledging to work with Congress on a "forceful response" to the ruling.

In the Republicans' weekly radio and Internet address, Rep. Pete Hoekstra (R., Mich.) said that Obama's visit was a chance "to show the president, firsthand, the painful plight of the people of Michigan."

Many of the graduates whom Obama addressed will soon learn how tough it is to find a job in this economy, Hoekstra said, adding that the share of young Americans out of work is the highest it's been in more than 50 years.