Relations between the uneasy neighbors, both important U.S. allies in its campaign against al Qaeda and the Taliban, have long been strained by Afghan accusations that Taliban insurgents operate from sanctuaries on the Pakistani side of their border.
Afghan leaders have often said they believed elements in Pakistan were still helping their old allies, the Taliban.
But a spokesman for the Afghan National Directorate of Security (NDS) on Wednesday accused Pakistan's Inter-Services Intelligence (ISI) agency of organizing the attack on Karzai.
It was the first time Afghanistan had accused Pakistan of trying to kill Karzai, who has survived several assassination attempts since he took over soon after U.S.-led forces ousted the Taliban in late 2001.
Taliban militants fired on a parade in the Afghan capital, Kabul, on April 27 killing three people, including a member of parliament, but missing the president.
Pakistan's Defence Minister Chaudhry Ahmed Mukhtar dismissed the accusation that the country's main military intelligence agency was involved.
"It appears to be a concocted statement. They often made such statement to instigate but we don't accept it. We believe they are lying," Ahmed told Reuters.
"Such statements will have a negative impact on the ongoing war on terror. They should think and refrain from giving such statement against their partner in the war," he said.
The accusation came two weeks after Karzai threatened to send troops into Pakistan to fight Taliban militants in border sanctuaries.
Karzai made his threat days after 11 Pakistani border soldiers were killed in a U.S. air strike as U.S. forces clashed with Taliban on the border.
Pakistan backed the Taliban when they emerged in the chaotic early 1990s and after they imposed their brand of hardline rule over most of Afghanistan in 1996.
But Pakistan dropped support for the Taliban and joined the U.S.-led campaign against terrorism after the September 11, 2001, attacks on the United States which were organized by Osama bin Laden, a guest of the Taliban.
But despite officially cutting support for the militants, Pakistan has been unable to dispel suspicion that for various national security reasons, some people in Pakistan are still helping the Taliban.
NDS spokesman Sayed Ansari was adamant that the Pakistani ISI was behind the attack on Karzai.
"The documents from the suspects and their confession clearly show that Pakistan terrorist organization ISI was behind the attack," he said.
"The terrorists were using code words in direct calls (to Pakistan), and also receiving SMS (phone messages) from outside the country, receiving and giving reports," Ansari said.
Sixteen Afghans, eight of them government employees, had admitted to involvement in the attack and about 20 government employees had been suspended.
Pakistani Foreign Ministry spokesman said he hoped the Afghans would adopt a "serious attitude" and not reignite a blame-game with "irresponsible and ill-considered" allegations.
"It's a bit surprising that such allegations are leveled," spokesman Mohammad Sadiq told a briefing. "Reports in international media suggest that the attack had something to do with a massive intelligence and security failure, or ... problems between the Afghan intelligence apparatus and the government."
(Additional reporting by Hamid Shalizai in Kabul; Writing by Robert Birsel; Editing by Sanjeev Miglani)