WASHINGTON -- Just three days before pivotal midterm elections, comedians Jon Stewart and Stephen Colbert threw a "sanity" rally in the shadow of the Capitol that organizers insisted wasn't about politics.

But there were political undertones to Saturday's event as the two Comedy Central hosts entertained a huge throng stretched alongside the National Mall by poking fun at the nation's diversity and its ill-tempered politics.

Stewart is popular especially with Democrats and independents, a Pew Research Center poll found. Colbert of "The Colbert Report" poses as an ultraconservative, and the stage Saturday was stacked with entertainers associated with Democratic causes or Obama's 2008 campaign.

Organizing for America, President Obama's political operation based at Democratic National Committee headquarters, was setting up a "Phone Bank for Sanity" after the rally to urge people to vote on Tuesday.

But organizers insisted the Rally to Restore Sanity and/or Fear wasn't about politics. Still, supporters and left-leaning advocacy groups hoped it would rekindle some of the voter enthusiasm for Democrats seen in 2008, particularly among young adults.

Some of the signs on display mocked Republicans who are expected to take control of the House Tuesday if not the Senate.

"Righties, don't stomp on my head," said one sign in a reference to a Republican rally in Kentucky at which a liberal activist was pulled to the ground and stepped on.

"I wouldn't care if the president was Muslim," said another.

Other signs were decidedly less political.

"I hate signs," read one sign. "Have you seen my keys?" said another.

People also carried signs in favor of United Farmworkers and the movement to give the District of Columbia a vote in Congress. Many were college students, but the crowd cut across all age groups. "Seniors for pot" cried a half-dozen older people.

The crowds were festive, goofy, disillusioned with the state of politics if not the nation, and ready to play nice at a gathering called to counter all the shouting and flying insults of these polarized times. So were the hosts.

Colbert arrived on stage like a rescued Chilean mine worker, in a capsule from a supposed underground bunker, after Stewart made a show of counting the crowd, tens of thousands strong, one by one.

In another shtick, Stewart and his associates queried some crowd-goers to identify themselves by category, eliciting answers from attendees such as "half-Mexican, half-white," "American woman single" and "Asian-American from Taiwan."

"It's a perfect demographic sampling of the American people," Stewart cracked. "As you know, if you have too many white people at a rally, your cause is racist. If you have too many people of color, then you must be asking for something -- special rights, like eating at restaurants or piggy back rides."

The event sought in part to be a counterpoint to the "Restoring Honor" rally in August by Glenn Beck, the Fox News commentator popular among conservatives and tea party supporters. Beck's rally, which had strong religious overtones, drew some protests from civil rights supporters.

Don Novello, who years ago played Father Guido Sarducci on "Saturday Night Live," provided the benediction. He polled the crowd on their religious leanings, then gave thanks to God for allowing everyone to assign their various causes to him.

Egged on by the hosts, Ozzy Osbourne and Yusuf Islam, formerly known as Cat Stevens, engaged in something of a battle of the bands, the heavy-metal rocker and the folkie interrupting each other.

The rally generated extensive buzz on the Internet, with more than 226,000 people on a Facebook page created for the event saying they would attend. The liberal Huffington Post was sending a caravan of 10,000 people on 200 buses from New York, while Oprah Winfrey expressed her support by providing travel expenses to a "Daily Show" studio audience of about 200 members so that they could attend.

Comedy Central's park permit puts the crowd estimate at 60,000. There were plans for satellite rallies in cities including Los Angeles, Chicago, Denver and Honolulu.

Stewart and Colbert encouraged attendees to bring signs with slogans such as "Real patriots can handle a difference in opinion," "It could be worse but let's not make it that way," and "Death to Nobody."

Stewart wants attendees to help restore the National Mall, which has a $400 million backlog of deferred maintenance. Colbert asked people to contribute to Donors Choose, which raises money for school supplies; proceeds from sales of rally merchandise also will go to the Yellow Ribbon Fund to help injured soldiers.

The Associated Press contributed to this report.