Imran Khan addresses the nation outside the Prime Minister's Office in Islamabad on Friday. AFP

Pakistan's prime minister said on Friday that he had warned the international community that India could launch an attack on Pakistani-held Kashmir in an effort to divert the attention from human rights abuses in its portion of the disputed Himalayan region.

In a speech at a rally in Islamabad, Imran Khan said his country would give a "befitting response" to the government of Indian Prime Minister Narendra Modi if it attacked.

"Every brick will be countered with a stone," he said. "Our armed forces are ready" to respond to any such attack, he said.

Khan said any conflict between nuclear-armed Pakistan and India would not be confined to the South Asian region. "The whole world will be affected" because of it, he said, adding that he will raise the issue when he addresses the UN General Assembly next month.

Khan said that people in Indian-administered Kashmir were living under curfew for almost four weeks since New Delhi downgraded Kashmir's autonomy on Aug. 5 and imposed a security clampdown to prevent any violence.

Khan assured his government's full support to Kashmiri people and said he hoped that Indian-administered Kashmir will soon get independence.

He described Modi as a "fascist" and equated him with Adolf Hitler, saying he feared a "genocide of Muslims in Kashmir." He said Modi had played his "last card" by downgrading the special status of Kashmir.

India on Thursday said it has information that Pakistan is trying to infiltrate "terrorists" into the country. Pakistan's army spokesman Maj. Gen. Ghafoor rejected the Indian claims, saying Pakistan was a responsible state and "we would be insane to allow infiltration" across the Line of Control.

Friday's rallies were held in almost all cities, towns and villages in Pakistan and Pakistani-controlled Kashmir to express solidarity with Kashmiris in the Indian-held portion.