Afghan Taliban leader Mullah Mohammed Omar has backed peace talks with the Afghan government in a statement released to the media.
A message, marking the festival of Eid al-Fitr, made no direct reference to the talks but said Islam did not bar "peaceful interaction" with enemies.
Afghan government officials last week met Taliban representatives in negotiations brokered by Pakistan.
The Taliban have stepped up attacks on Afghan security forces.
Nato concluded its combat mission in Afghanistan last December, replacing it with a smaller deployment intended to train Afghan security forces until 2016.
Pakistan last week hosted the first formal face-to-face negotiations between Taliban representatives and the Afghan government.
Although the statement made by Mullah Omar is not made in audio or video, correspondents say its intention is to end speculation that the reclusive Taliban leader had not authorised the latest talks.
The text, published on a Taliban website, suggested that negotiations were a "legitimate" way of achieving the objective of ending occupation by foreign forces.
The statement said political means to achieve "sacred goals" could be pursued "concurrently with armed jihad", under Islamic principles.
Analysis: Dawood Azami, BBC World ServiceThe explicit endorsement of peace talks in this year's message is unprecedented. In the past, the Taliban insisted on talking only to the US, who they consider the main party to the conflict.
Though he does not refer specifically to last week's meeting in Islamabad between Afghan officials and the Taliban representatives, he has openly backed negotiations with his fellow Afghans too.
Meanwhile, he said that fighting would continue until the end of "occupation and the establishment of the Islamic system".
Although the Taliban are blamed for most civilian casualties, he reminds his followers to take care in their operations and not harm civilians.
His tone is full of confidence, spurred on by recent advances in the battlefield.
M Ilyas Khan: Will talks with the Taliban deliver a peace dividend?
The statement also made an apparent reference to the Islamic State militant group,whose Afghan affiliate has gained ground in Afghanistan and is opposed to any talks.
It has clashed with the Taliban and drawn away some of their supporters.
"We have...directed all our mujahideen to preserve their unity and forcefully prevent all those elements who attempt to create differences," the statement said.
BBC Monitoring media analyst Mina al-Lami says that Mullah Omar's message may serve only to give ammunition to IS, who are out to undermine the Taliban's jihadist credentials.
It comes amid speculation spread by IS that Mullah Omar is dead and that the Taliban are no longer capable of leading the jihadist movement in the Afghan-Pakistan region.
In his message, Mullah Omar appears unfazed by IS criticism, our analyst says.
While his open-ness to talks may cost him the support of more conservative elements within the jihadist movement, it could win him favour among the wider Afghan public, who he seems to court in his message by promising better governance.
JUSTCLICK & CONNECT