Defence Secretary John Healey gave details about the activities of the Yantar, which he said the Russians “used for gathering intelligence and mapping the UK’s critical underwater infrastructure”.
Mr Healey warned Mr Putin “we see you, we know what you are doing and we will not shy away from robust action to protect this country”.
He told MPs the Yantar was in the North Sea having passed through British waters in recent days, where it had been shadowed by Royal Navy ships HMS Somerset and HMS Tyne.
But he said it was the second time the Yantar had entered UK waters in recent months.
“In November, the ship was also closely watched and detected loitering over UK critical undersea infrastructure. To deter any potential threat, I took measured steps,” he told the Commons.
“I can confirm to the House that I authorised a Royal Navy submarine, strictly as a deterrent measure, to surface close to the Yantar to make clear that we had been covertly monitoring its every move.
“The ship then left UK waters without further loitering and sailed down to the Mediterranean.”
The submarine is understood to have been one of the UK’s Astute-class nuclear-powered attack boats.
On the Yantar’s return to the waters around the UK on Monday, Mr Healey changed the Royal Navy’s rules of engagement to allowing shadowing vessels to get closer.
The Defence Secretary said: “The foreign ship Yantar is currently in the North Sea having passed through British waters.
“Let me be clear, this is a Russian spy ship used for gathering intelligence and mapping the UK’s critical underwater infrastructure.
“Yantar entered the UK exclusive economic zone about 45 miles off the British coast on Monday.
“For the last two days the Royal Navy has deployed HMS Somerset and HMS Tyne to monitor the vessel every minute through our waters.
“I changed the Royal Navy’s rules of engagement so that our warships can get closer and better track the Yantar.
“So far, the ship has complied with international rules of navigation.”
The UK and Nato allies are increasingly concerned about the risk Russia poses to offshore cables, pipelines and other infrastructure.
P-8 Poseidon and Rivet Joint spy planes will join the Nato operation to protect undersea cabling in the Baltic Sea, while survey and surveillance ship RFA Proteus has also been deployed to monitor offshore infrastructure.
The Defence Secretary said Russia was “dangerous but fundamentally weak”, as he referenced the casualties the country had suffered during the war in Ukraine and its decision to draft in troops from North Korea.
He said: “Russia remains the most pressing and immediate threat to Britain, and I want to assure the House and the British people that any threat will be met with strength and resolve.”
Shadow defence secretary James Cartlidge said the change to the Navy’s rules of engagement “sends a powerful signal to Putin that we will not be intimidated and that if his aim is to keep pushing the boundaries of malign activity in our waters, and those proximate to us, we will respond”.