ALIQUIPPA, Pennsylvania (Reuters) – Democratic presidential candidate Hillary Clinton on Wednesday attacked her rivals over Iraq, saying Democrat Barack Obama is all talk when it comes to ending the war and Republican John McCain would keep it going.

New York Sen. Clinton and Illinois Sen. Obama traded barbs in Pennsylvania, whose April 22 vote is the next milepost in a long campaign for the Democratic presidential nomination to determine who will face McCain in the November election.

Polls showed a tightening picture in the state with Obama making a move against Clintonâ€™s former big lead.

The rivals spoke a day after testimony to the U.S. Congress from the top U.S. commander in Iraq, Gen. David Petraeus, whose remarks left no doubt that more than 100,000 troops will still be in Iraq next January when the successor to President George W. Bush takes office.

Petraeusâ€™ testimony allowed Clinton, Obama and McCain to push their competing positions on the Iraq war, which remains unpopular with U.S. voters. The Democrats say it is time to end the war while Arizona Sen. McCain said the current strategy is working.

Speaking at a town hall meeting, Clinton questioned whether Obama was committed to pulling out U.S. troops as he says he would do. She also said McCain has no interest in ending the war.

â€œThatâ€™s the choice. One candidate will continue the war and keep troops in Iraq indefinitely, one candidate only says heâ€™ll end the war,â€ Clinton said at a high school in a Pittsburgh suburb.

â€œAnd one candidate is ready, willing and able to end the war and to rebuild our military while honoring our soldiers and our veterans,â€ Clinton said of herself.

Clinton and Obama both say they would begin working to withdraw U.S. troops from Iraq shortly after taking office in January 2009, a position McCain calls â€œa failure of leadership.â€

The Republican National Committee returned fire on Clinton, saying her vow to pull U.S. troops from Iraq â€œwould leave Iraq to the terrorists, and lead the U.S. into a wider and more difficult war in the future.â€

At a town hall meeting in Malvern, Penn., outside of Philadelphia, Obama bashed both Clinton and McCain for voting to authorize the 5-year-old war in Iraq.

Obama was asked what he thought about Clintonâ€™s television advertisement in which she suggested she was more qualified than Obama to answer a 3 a.m. call on a national security crisis — an ad that helped her win Texas and Ohio.

â€œThe person you want answering the phone at 3 a.m. is the person who has read the intelligence reports, who is asking the tough questions about why we want to invade a country like Iraq that had nothing to do with 9/11. Thatâ€™s somebody who has good judgment. And thereâ€™s only one out of the remaining candidates who qualifies on that front,â€ Obama said.

Many senators, both Democrats and Republicans, raised concerns about what they called the absence of a U.S. pathway out of Iraq after five years of war, 4,000 American dead and billions of dollars spent.

McCain defended the lack of a clear exit plan.

â€œThe exit strategy is success of the surge, continued Iraqi ability to take over their security, requirements to have the democratic process go forward. Itâ€™s the classic counterinsurgency strategy,â€ McCain told the Fox News Channel.

Clinton called on Bush to propose a strategy for ending U.S. involvement in Iraq, and said he should not set up a long-term security agreement with the Iraqi government without approval from Congress.

â€œPresident Bush must not saddle the next president with an agreement that extends our involvement in Iraq beyond his presidency,â€ said Clinton, who was flanked by retired military officials.

Clinton said U.S. troops should be guaranteed one month at home for every month they spend overseas, and should be allowed to leave the military when their contractual time is up.

(Additional reporting by Caren Bohan; Writing by Steve Holland, editing by David Wiessler)