ALIQUIPPA, Pennsylvania (CNN) -- Sen. Hillary Clinton on Wednesday argued that she is the only presidential candidate capable of ending the war in Iraq.
"One candidate will continue the war and keep the troops in Iraq indefinitely. One candidate only says he will end the war," she said while campaigning in Pennsylvania.
"And one candidate is ready, willing and able to end the war and to rebuild our military while honoring our soldiers and our veterans."
The senator from New York tried to make her case that Sens. Barack Obama, her Democratic rival, and John McCain, the presumptive Republican presidential nominee, can't be trusted to end the war. Watch Clinton say she is ready to end the war »
Her comments come one day after she told Gen. David Petraeus, the top U.S. commander in Iraq, and Ryan Crocker, U.S. ambassador to Iraq, that it would be "irresponsible" to continue American military involvement there.
Before a backdrop reading "Solutions for a Strong Military," Clinton accused McCain of wanting to keep troops in Iraq "for up to 100 years," an allegation the Republican's campaign has disputed.
"Yesterday, he basically reiterated his commitment to the course we are on," she said. "Well, I don't agree with that." Watch Clinton go on the offensive about Iraq »
In response, Republican National Committee spokesman Alex Conant accused Clinton of not listening to Petraeus and Crocker.
"Sen. Clinton's calls for retreat would leave Iraq to the terrorists and lead the U.S. into a wider and more difficult war in the future. It's clear Clinton is listening to her party's left-wing base and not Gen. Petraeus and Ambassador Crocker," he said. Watch what the candidates asked Petraeus »
Clinton's plan calls for withdrawing troops within 60 days of her becoming president, in consult with military advisers. In her speech Wednesday, she questioned Obama's commitment to achieving the same goal.
"Sen. Obama on the other hand says he will end the war, but his top foreign policy adviser said he won't necessarily follow the plan he has been talking about during this campaign, that his plan is just words," she said. "You can count on me to end the war safely and responsibly."
Clinton was referring to former Obama adviser Samantha Power, who told the BBC in March that it would be difficult for the next president to commit firmly to a campaign pledge to withdraw troops, when no one can predict what the situation on the ground in Iraq will be in January 2009.
Power said Obama's plan to withdraw combat troops within 16 months is a "best-case scenario." She resigned last month after a Scottish newspaper quoted her calling Clinton a "monster." Watch an analysis of where Obama, Clinton stand on Iraq and in the polls »
The Obama camp issued a statement saying the senator from Illinois "is the only candidate who had the judgment to oppose the war from the very beginning, not just from the beginning of a campaign for president."
"Hillary Clinton's tired and discredited attack is just the same old politics that won't end this war that she voted to authorize, and won't change the fact that she has repeatedly misled the American people about her Iraq record," said Hari Sevugan, spokesman for Obama for America.
Obama on Tuesday called the invasion of Iraq a "massive strategic blunder" that enabled al Qaeda and Iran to spread their influence into Iraq, and he said the United States should pressure Iraqi officials to settle the war by threatening to leave.
He questioned whether the conditions set by U.S. commanders for withdrawal would lead to a war that could last 20 to 30 years.
"Nobody's asking for a precipitous withdrawal. But I do think it has to be a measured, but increased, pressure and a diplomatic surge that includes Iran," Obama said.
"Because if [Iraqi Prime Minister Nuri al-Maliki] can tolerate normal neighbor-to-neighbor relations in Iran, then we should be talking to them as well. I do not believe we're going to be able to stabilize the situation without them."
McCain on Tuesday said that success in Iraq was "within reach."
"Our goal -- my goal -- is an Iraq that no longer needs American troops, and I believe we can achieve that goal, perhaps sooner than many imagine," he said.
"But I also believe that the promise of withdrawal of our forces regardless of the consequences would constitute a failure of political and moral leadership."
Petraeus and Crocker spent about nine hours Tuesday giving the Senate Armed Services and Foreign Relations committees their assessments of the 5-year-old war. The two men returned to testify Wednesday before a House committee. E-mail to a friend
CNN's Peter Hamby contributed to this report.