Updated

Taliban militants fired rockets near President Hamid Karzai in an apparent assassination attempt in central Afghanistan on Sunday, but the missiles fell short and no one was hurt, officials and witnesses said.

The attack happened as clashes and airstrikes in the country's south and northwest left 47 suspected militants and two police dead.

Karzai was giving a speech to the elders and residents of Andar district in Ghazni province when rockets were fired nearby, said Ali Shah Ahmadzai, provincial police chief.

Witnesses said they heard between four and six rockets, but the Taliban claimed it fired off 12.

• More coverage is available in FOXNews.com's Afghanistan center.

The rockets missed their target, and Karzai continued his speech, calling on those gathered to remain calm, said Arif Yaqoubi, a local reporter attending the event.

Purported Taliban spokesman Qari Yousef Ahmadi told The Associated Press that Taliban militants were behind the attack.

"The Taliban knew that Karzai was coming to Andar district. When Karzai was meeting with the people, the Taliban fired 12 rockets," Ahmadi said by satellite phone from an undisclosed location. "The rockets fell nearby."

The Taliban watched the area for an hour after the attack as ambulances and helicopters patrolled the area, Ahmadi said, adding that they did not know how many people were wounded or killed.

An Afghan government official, who did not want to be named because he was not authorized to speak on the incident, said no casualties were reported in the incident.

Yaqoubi said six rockets were fired nearby as Karzai was telling people gathered at a school yard in Andar about government projects to build roads and clinics.

"He briefly stopped his speech, and the people were concerned and worried," Yaqoubi said. "But then Karzai continued by saying, 'Calm down and don't worry."'

Khial Mohammad, a Ghazni lawmaker also at the event, said that during the speech "we heard the sounds of rockets whizzing over our heads" before slamming in the distance.

In northwestern Afghanistan, meanwhile, militants attacked three separate posts Saturday in Murghab district of Badghis province, sparking a six-hour long battle that left 20 suspected Taliban and two police killed, said provincial police chief Gen. Mohammad Ayub Naizyar.

Police repelled the attack and sent reinforcements to the area, forcing the militants to withdraw, Naizyar said.

There have been a number of attacks in the relatively peaceful north, but the southern and eastern provinces are the hardest hit by the insurgency.

In southern Zabul province, NATO and Afghan troops clashed with militants and called in airstrikes, leaving 27 suspected Taliban insurgents dead in the district of Shinkay, said Defense Ministry spokesman Gen. Mohammad Zahir Azimi.

The operation followed intelligence reports of militant activity in the area, Azimi said. There were no reports of civilian casualties, he said.

Neither claim could be independently verified because the incidents occurred in remote areas.

After a winter lull, there has been a sharp spike in clashes and other violence this spring in Afghanistan. Some 2,200 people, many of them insurgents, have died in insurgency-related violence this year, according to an AP count based on numbers reported by the U.S., NATO, U.N. and Afghan officials.

Visit FOXNews.com's Afghanistan center for complete coverage.