KARACHI (Reuters) - The Pakistani navy detected an Indian submarine off the Pakistani coast and prevented it from entering its waters, it said in a statement on Friday, prompting a denial by India as tension between the nuclear-armed rivals simmers.

The submarine was detected "south of the Pakistani coast" on Monday, the navy said in a press release.

"Thereafter, despite the submarine's desperate efforts to escape detection, it was continuously tracked by Pakistan Navy Fleet units and pushed well clear of our waters," the press release said.

The Pakistan navy also released footage and photographs of what it was said was the submarine.

"This is all blatant lies," Indian navy spokesman D. K. Sharma told Reuters.

Relations between Pakistan and India have been strained for several months, while cross-frontier shelling has intensified leading to deaths of civilians and soldiers stationed along the disputed frontier.

Kashmir lies at the heart of the tension. The countries have fought two of their three wars over the region since partition and independence from Britain in 1947.

(Reporting by Syed Raza Hassan in Karachi and Tommy Wilkes in New Delhi; Writing by Mehreen Zahra-Malik; Editing by Nick Macfie)