Afghan President Hamid Karzai was moved to a safe area and his palace went into lockdown as Kabul was hit by a wave of attacks including a failed attempt to target one of his deputies on Sunday, officials said.

The embattled president was discussing the budget with a group of lawmakers when explosions and gunfire rocked three locations in the capital, including an upmarket diplomatic enclave close to his fortified palace, one of his assistants said.

All his afternoon meetings, including one with a delegation of an insurgent group in Kabul for peace talks, were cancelled, the official said requesting anonymity because of the sensitivity of the matter.

Additional bodyguards were deployed in the presidential palace and a meeting with a delegation of Hezb-i-Islami, an insurgent group led by former prime minister Gulbadin Hekmatyar, now holding peace talks with Karzai was cancelled, the assistant said.

Lutfullah Mashal, a spokesman for the National Directorate of Security (NDS) the war-torn country's intelligence agency, said that Mohammad Karim Khalili, one of Karzai's two deputies was one of the targets of today's attacks.

Mashal said the group tasked with attacking Khalili's home in west Kabul was captured before reaching their target.