The top U.S. general in Afghanistan somehow escaped unscathed from a bloody "insider attack" in the country Thursday that claimed the lives of three important local leaders and wounded a duo of Americans who had gathered for a high-level meeting at the Kandahar Province governor's mansion.

Officials said Army Gen. Scott Miller, the top U.S. general in the war-torn country, had been at the meeting but was unharmed, U.S. officials said. It was not immediately clear if Miller was in the room when the shooting began, with some local media reporting the general had left only minutes before.

Kandahar deputy provincial governor Agha Lala Dastageri said powerful provincial police chief Abdul Razik -- a longtime and key U.S. ally -- and provincial intelligence chief Abdul Mohmin were killed immediately. Provincial governor Zalmay Wesa had been reported killed in the attack, but the U.S. military said he was being treated.

"The governor is being treated at a [NATO] Resolute Support treatment facility," Col. Dave Butler said in a statement.

The shooter in the Taliban-claimed “insider attack," was also killed, one U.S. official said. The assailant was reportedly one of the governor's bodyguards.

Of the two Americans who were wounded, one was a civilian and one was a member of the military. A military spokesman initially said three people were wounded, but later clarified the third was a contractor who was not an American citizen. U.S. officials declined to provide further details identifying the victims.

Raziq, a powerful force in the country who had eluded countless assassination attempts, was reportedly killed as he departed the meeting.

“A dark say! Shocked & heartbroken by the demise of close friend, great patriot & national hero Gen Abdul Raziq who single-handedly restored stability to to (sic) a volatile Kandahar and the greater south – May he rest in eternal peace!” tweeted Omar Zakhiwal, Afghanistan’s Ambassador to Pakistan.

The attack comes two days before Afghanistan’s parliamentary elections Saturday.

Kandahar is one of the most volatile provinces in Afghanistan. It's the spiritual home of the Taliban and is where the Islamist group held its first organizational meetings in the 1990s.

There are currently 15,000 U.S. troops serving in the country. Seven soldiers have been killed in action this year.

The Associated Press contributed to this report.