Kargil: India has always viewed war as the last resort, but the armed forces have the strength and strategies to give a befitting reply to anyone who casts an evil eye on the nation, Prime Minister Narendra Modi said on Monday.

Addressing the armed forces here on Diwali, the prime minister also recalled his visit to this frontier region in the aftermath of the Kargil conflict in 1999 when the Indian military had "crushed the hood of terror".

"There has not been a single war with Pakistan when Kargil has not flown the victory flag," he said adding that Diwali symbolised the "celebration of the end of terror".

"I have witnessed the Kargil war closely. It was my duty that had brought me to Kargil back then. There are many memories of that time when the sounds of victory were reverberating all around," Modi said, continuing with the tradition set by him to celebrate Diwali at the country's frontiers.

"In Kargil, our armed forces had crushed the hood of terror and people still remember the Diwali that was celebrated back then," he said.

He said over the last eight years, the government has worked on implementing reforms in the armed forces by deploying new technologies, developing infrastructure in border areas and opening up positions for women in the forces.

"The induction of women in the armed forces will boost our strength," Modi said and added that reforms in the armed forces that were required for decades are now being implemented.

The prime minister said a nation is safe when its borders are secure, economy strong and society full of confidence.

India has been dealing with its enemies, both external and internal, with force, Modi said and recounted the steps taken to "uproot" the "terror, Naxalism and extremism" from within the country.

He said India has never viewed war as the first option. "We have always seen war as the final resort. We are in favour of global peace.. But peace cannot be achieved without strength," Modi said.

"Our armed forces have the strategies as well as the strength. If anyone dares cast an evil eye on us, our three armed forces know very well how to give a befitting reply," the prime minister said.

Prime Minister Modi also said that 'Aatmanirbhar Bharat' most important to the nation's security and the country's dependence should be minimal on foreign weapons and systems.

Since coming to power in 2014, Modi has been visiting different military facilities to celebrate Diwali.