KABUL, Afghanistan - Afghanistan's intelligence agencies said Wednesday that they have thwarted two major attacks in Kabul in the past 20 days: a plot to assassinate the country's first vice president and a bombing near the president's palace.

Latifullah Mashal, spokesman for the agencies, said authorities arrested five people who had been plotting a shooting and suicide bomb attack at the home of First Vice President Marshal Mohammad Qasim Fahim.

"They were arrested when they were very close to attacking," Mashal told a news conference, adding that the five were members of the Haqqani network, an al Qaeda-linked militant group based in neighboring Pakistan.

He would not give an exact timing of the arrests or the planned attack, citing security reasons.

The other foiled attack was a planned car or suicide bombing near President Hamid Karzai's palace, Mashal said. The two suspects arrested in that case had been involved in rocket attacks against NATO and coalition forces in the past, he added.

Major attacks inside the Afghan capital have been rare in the past year. However, areas of Afghanistan once considered safe have become less secure as insurgents, squeezed by NATO operations focusing on militant strongholds in the south, have expanded their reach to other parts of the country.

"The past year, unfortunately, was not a good year from the security point of view," Mashal said. But security in many provinces, including Kabul, has improved, he said.

He said Afghan authorities prevented numerous attacks by arresting 47 people who were part of 17 suicide bombing groups in the last nine months, as well as 60 people who were members of 22 kidnap rings.

Separately, NATO said one of its servicemembers had been killed in a roadside bomb explosion in southern Afghanistan on Wednesday -- the fourth coalition service member to be killed in the country's troubled south since the start of the year. NATO did not release the casualty's nationality or give a more precise location of the attack, in line with its standard policy.