KABUL, Afghanistan - Afghan legislators passed a bill Tuesday calling on the government to open dialogue with Taliban fighters and prohibiting international forces from firing their weapons and launching raids, unless they come under attack first.

The bill was passed by a voice vote in the upper house. It would also need to be approved by the lower house and signed by President Hamid Karzai before coming law.

The bill said negotiations should only be held with Afghan Taliban militants, not Pakistani Taliban fighters or al-Qaeda operatives. It said the aim would be to persuade the militants to give up their fight against the government.

The bill would also prohibit international forces from launching military operations, unless they are attacked or have first consulted with the Afghan army, government or police.

Lt.-Col. David Accetta, a U.S. military spokesman, said he was aware of the legislators' action but did not have an immediate response.

"It remains to be seen what impact it will have," he said.

A spokeswoman at NATO's International Security Assistance Force declined immediate comment.

Karzai has previously called for negotiations to be held with Afghan members of the Taliban and NATO military officials have said they would rather persuade Taliban fighters to join the government than kill them during military action.

Karzai's spokesman couldn't be reached for comment on the bill late Tuesday.

Western and Afghan officials have said only a few members of the Taliban are hardcore, ideological fighters and many of the militants fight only for a paycheque or because they are forced.

Officials also say many of the Taliban's hardcore leaders live in Pakistan, a charge Pakistan denies.

The bill said Pakistani Taliban and al-Qaeda fighters are the enemy of Afghanistan.

It also said when the Afghan army and police ranks reach their target numbers, a timetable should be drafted for international military forces to leave the country. The army and police likely won't reach their target goals for several years.