One Isaf soldier was killed and another wounded, General Carlos Branco, an Isaf spokesman, told the AFP news agency.
Lithuania's defence ministry confirmed that the soldier was one of about 260 Lithuanian troops in Isaf.
The soldier is the first member of the Lithuanian force to be killed in Afghanistan, the ministry said without giving further details.
Isaf said two civilians were killed and seven others wounded in the shooting incident, with 10 Afghan policemen wounded.
"The local nationals were killed or wounded by Afghan national police after the protest turned violent when rocks were thrown and tents set on fire," Isaf said in a statement.
However, Ikramuddin Yawar, police chief for western Afghanistan, said the two civilians were killed by fighters who had joined the demonstration.
He said the fighters fired at the Nato base to "deteriorate the situation".
"As the people were trying to enter the base, they fired and two civilians were killed," Yawar said.
Meanwhile, Mohammad Daud Ghafari, the head of the provincial council, blamed the shooting on the security forces.
"Police and the Nato soldiers opened fire on the people and two civilians were killed," he said.
Shah Jihan Noori, a local police chief, said demonstrators poured onto the streets to protest against an incident in March when a US soldier riddled the Muslim holy book with bullets during a target-practice session in Iraq.
"A large number of people tried to attack the Lithuanian base, the UN office and governmental buildings," he said.
George Bush, the US president, has apologised to Iraq for the US soldier's attack on the Quran.
US military authorities also apologised to the local community west of Baghdad where the incident took place, saying it was an "isolated incident".
About 70,000 troops from about 40 countries are involved in counter-resistance and reconstruction work in Afghanistan, where the Taliban were ousted from government in 2001.
In other violence on Thursday, one Afghan soldier was killed and another wounded after a bomb attached to a bicycle exploded in the southern city of Kandahar, police said.
In central Ghazni province, police said they found the bodies of three security guards who had been kidnapped a week earlier.
Zabihullah Mujahed, a spokesman for the Taliban, said that men from his group had captured and killed the men.