Democratic Party chief Howard Dean accused President Bush and the Republican Party on Friday of exploiting the immigration issue for political gain by scapegoating Hispanics.

Dean and Bush agree on the legislation at the heart of the debate. Both support a Senate bill that would expand guest-worker programs for an estimated 400,000 immigrants each year.

However, at a speech in an Oakland union hall, the 2004 Democratic presidential candidate sought to tie Bush to a much tougher House bill that would tighten borders and make it a crime to be in the United States illegally or to offer aid to illegal immigrants. Bush does not back the House bill.

"This is a nonsensical proposal put out by far right-wingers in the Republican Party who have been endorsed for re-election by the president of the United States," Dean said. "The president has a moral obligation to rein in the right-wing extremists in his party and stop this divisive rhetoric about immigrants."

Dean devoted much of his short speech here to the immigration debate, which has taken center stage in Washington this election year and touched off mass demonstrations elsewhere. More than 500,000 immigration-rights activists marched in downtown Los Angeles on Saturday, largely to protest the House measure.

Bush has spent much of his career courting Hispanic voters, the nation's fastest-growing voting bloc, and he has helped double the GOP's share of the Hispanic vote since 2000.

Nevertheless, Dean accused Bush and fellow Republicans of demagoguery in the immigration debate, saying it fit with a long-standing pattern. He cited the president's opposition to the University of Michigan's affirmative-action program and Bush's decision to "pick on" homosexuals — an apparent reference to the gay marriage issue in the 2004 election.

"In 2006 it's immigrants. That's what their strategy is on the Republican side: divide people, scapegoat them, set them aside, point the finger at them," Dean said. "Well, that may be good for the Republican Party, but it's bad for America, and we're not going to do that."

During his remarks criticizing Bush, Dean was interrupted by a shout of "Impeach!"

A spokeswoman for the Republican National Committee did not immediately return a call for comment.

In Mexico, Bush said the United States must enforce the laws protecting borders but he also repeated his support for a "guest worker program that would allow undocumented immigrants already in the country to remain.