Kabul, Afghanistan (CNN) -- Afghan President Hamid Karzai, just days after meeting with U.S. President Barack Obama, castigated the international community for meddling in national elections, saying foreigners -- not his supporters -- are responsible for widespread fraud.
"No doubt, there was huge fraud, there was vast fraud," Karzai said Thursday in a speech before the Independent Election Commission. "The fraud is not by the Afghans. This fraud has been done by the foreigners."
Karzai's comments come as Afghanistan is debating what role foreigners will play in parliamentary elections set for September.
On Wednesday, the lower house of Parliament rejected Karzai's decree revoking the authority of the United Nations to appoint members of the Electoral Complaints Commission -- the same panel that tossed fraudulent votes cast for Karzai last summer.
A U.N.-backed fraud monitoring panel had invalidated nearly a third of Karzai's votes from last August's presidential election because of "clear and convincing evidence of fraud."
A runoff vote was canceled in the close race after challenger Abdullah Abdullah withdrew and Karzai was declared the winner.
The elections were seen as a key test for Afghanistan's struggling democracy, and the allegations of fraud stoked tensions between Karzai and his international allies, especially the United States.
Obama's visit earlier in the week was seen as an attempt by Washington to work out political difficulties as the United States and coalition forces prepare for a June military offensive designed to wrest control of the southern city of Kandahar from the Taliban.
With Obama at his side, Karzai thanked the United States, pointing out that U.S. taxpayers have helped rebuild his country.
But his accusations Thursday revealed the prickly nature of his relationship with his most powerful ally.
The United Nations in Afghanistan did not comment on Karzai's allegations. But Peter Galbraith, the former U.N. deputy chief in Afghanistan who was at odds with the U.N. chief for his early criticism of the presidential vote, said he he thought at first that Karzai was making an "April Fool's joke."
"The U.N. fired me for trying to prevent that kind of fraud, and Karzai and his lieutenants committed it to try to get him re-elected," Galbraith said. "It's absurd to suggest that I or the U.N. could have done this."
Galbraith said Karzai's connection to reality is slim.
"This just shows how unreliable he is as an ally," he said.
At a press briefing, U.S. State Department spokesman P.J. Crowley said he had not seen Karzai's specific comments but that the United States will continue to press the Afghan president on promises he made in his inaugural speech -- to fight corruption and practice good governance.