3:30 am (2300 GMT Monday), sparking a 30-minute gun battle that left all the insurgents dead, Kandahar governor spokesman Jawed Faisal said.
NATO's US-led International Security Assistance Force (ISAF) said the attackers breached the outer perimeter of the base but said no coalition soldiers were killed in the incident.
Hours later, four gunmen wearing police uniforms struck a police and NATO base in Kandahar city, triggering a fight in which three officers and all the attackers were killed, provincial police chief General Abdul Raziq told AFP.
Police witnesses said the attackers were sporting all the uniform and equipment a regular officer would have, and were led into the base by a police captain, who fled afterwards. Two other officers were arrested over the attack.
Tuesday's attacks came a day after men wearing Afghan police uniforms opened fire on NATO soldiers in Kandahar, killing one before fleeing.
The attack brought to 23 the number of Western troops killed in 17 so-called "green-on-blue" incidents in the war-torn country so far this year.
"The International Security Assistance Force confirms that three individuals in Afghan police uniforms turned their weapons against coalition service members in southern Afghanistan yesterday, killing one ISAF service member," the alliance said in a statement.
A police official in Zhary district said the dead soldier was American, but there was no immediate confirmation of this.
ISAF gave no further details of the incident or the soldiers' nationalities, though the majority of coalition forces in Kandahar are American.
In other violence, on Monday a Taliban roadside bombing killed eight civilians, including women and children, in the neighbouring province of Helmand, the interior ministry said.
An increasing number of Afghan troops have turned their weapons against NATO soldiers who are helping Kabul fight a decade-long insurgency by hardline Taliban Islamists.
Some of the assaults are claimed by the Taliban, who say they have infiltrated the ranks of Afghan security forces, but many are attributed to cultural differences and antagonism between the allied forces.
The last such incident occurred in May, when Afghan police officers killed two British soldiers in southern Helmand province.
The US-led ISAF has taken security measures in response to the shootings, including assigning "guardian angels" -- soldiers who watch over their comrades as they sleep.
NATO has around 130,000 soldiers fighting alongside 350,000 Afghan security personnel against the Taliban-led insurgency, but they are due to pull out of the country in 2014.
The Western coalition is to hand security to local forces by mid-2013 and will play a support role up to the final withdrawal by the end of 2014.