The message from Mullah Omar comes less than a month before the eighth anniversary of the U.S.-led invasion of Afghanistan to oust the Taliban for hosting al-Qaida leader Osama bin Laden.
Mullah Omar said the U.S. and NATO should study the history of Alexander the Great, whose forces were defeated by Pashtun tribesmen in the 4th century.
"We would like to point out that we fought against the British invaders for 80 years from 1839 to 1919 and ultimately got independence by defeating" Britain, a statement attributed to Omar said.
"Today we have strong determination, military training and effective weapons. Still more, we have preparedness for a long war and the regional situation is in our favor. Therefore, we will continue to wage jihad until we gain independence and force the invaders to pull out," it said.
The statement was posted on a website the Taliban frequently uses.
Omar is believed to be in hiding in Pakistan but hasn't been seen in years.
Meanwhile, Al-Qaida posted a new video this week threatening that if Germans do not push their political parties to withdraw the country's soldiers from Afghanistan, "there will be a rude awakening after the elections." Germany holds national elections Sept. 27.
Omar's message said the international community has "wrongly depicted" the Taliban as a force against education and women's rights. It did not elaborate.