The development came days after a rare aerial dogfight between India and Pakistan over Kashmir ignited fears of an all-out conflict, with world powers rushing to urge restraint.
"The Pakistan navy stopped an Indian submarine from entering our territorial waters," a naval spokesman said in a statement.
He said "the Indian submarine was not targeted in line with the government's policy of maintaining peace".
It was the first such incident since 2016, when Pakistan said it had "pushed" an Indian submarine away from Pakistani waters.
The spokesman did not give further details, including when or where the submarine was detected. It was also not clear if they meant the 12 nautical mile (22 kilometre) territorial waters limit or the broader 200 nautical mile (370 kilometre) exclusive economic zone.
The navy also released what it said was video of the submarine, with the grainy black and white footage showing only what appeared to be a periscope above water. The timestamp on the video clip shows it began at 8.35 pm on Monday.
There was no immediate comment from Indian officials.
In recent days the nuclear-armed Asian countries have come closer to conflict than in years, after a suicide bombing in Jammu and Kashmir's Pulwama killed 40 Indian paramilitaries.
A militant group based in Pakistan claimed responsibility for the February 14 blast, and 12 days later Indian jets bombed what New Delhi called a terrorist training camp deep inside Pakistan.
Pakistan has denied any damage or casualties.
The next day Pakistani aircraft entered Indian airspace and the two nations' jets engaged in aerial dogfights, with at least one Indian aircraft shot down and its pilot captured by Pakistan.
The pilot was handed back to India last Friday in what Pakistani Prime Minister Imran Khan called a "peace gesture".
Both sides also claimed a second plane had been shot down, but they have disputed whose plane it was and what happened to the pilot.
Pakistani and Indian soldiers have continued to fire artillery and mortars over the Line of Control, in the days since, killing several civilians on both sides.
'The Indian submarine was not targeted in line with the government's policy of maintaining peace,' a spokesperson for the Pakistan Navy said.