NATO secretary general Anders Fogh Rasmussen says members of the U.S.-led alliance must stand shoulder to shoulder to confront "virulent, violent and anti-Western threats" from both Russia and the so-called Islamic State extremist organization.

In a farewell speech as NATO's top civilian official, Rasmussen said Monday the alliance finds itself on the front lines of a geopolitical division between "tolerance and fanaticism," and "democracy and totalitarianism."

"We must stand strong as a force for freedom," said Rasmussen. He said NATO and its member nations must face the fact that the new security challenges it faces could last for years.

Rasmussen's five-year term as NATO secretary general comes to a close at the end of the month. He spoke at a Brussels gathering of the Carnegie Europe think tank.