There was never any danger, but the incident provided some unexpected drama after Harper and his wife, Laureen, spent the night on the frigate, HMCS Fredericton.
They boarded in the Polish port of Gdynia on Tuesday night. After returning ashore on Wednesday, they departed for Rome, as the prime minister's six-day European trip winds down.
Harper's 20-hour visit with Canadian sailors came during a planned NATO training exercise called Baltops 2015, part of the alliance's ongoing reassurance mission in eastern Europe aimed at countering Russian-backed unrest in Ukraine.
Defence Minister Jason Kenney — who also made the voyage — first disclosed the presence of the two Russian frigates to reporters travelling with Harper.
As they stood on the stern of the ship, Kenney pointed out two small, light-coloured vessels on the horizon.
"The deal is, these frigates were tracking the core of the NATO operation Baltops last night and this morning," Kenney said.
About a half hour later, Kenney delivered a short update.
"They were ... tracking us east and this vessel corrected to go south," he said.
Cmdr. Jeffrey Murray, the Fredericton's captain, said his ship was heading south to Poland while the other two vessels were heading east-southeast.
The closest they came to the Fredericton was seven nautical miles, he said.
"Their interactions have been non-interfering and non-threatening, so we carry on with our exercises and our operations and there's been no impact," Murray said.
Until two years ago, Russia took part in the yearly naval exercise in partnership with NATO. It has a naval base not far from Poland, said Murray.
But when relations between the West and Russia deteriorated over Moscow's backing of rebels in Ukraine's east and its annexation of Crimea, they were out of that military club.
"I fully expect that they are keeping situation awareness as all militaries do when they're operating,"Murray said. "So I would say that they do what we do and they make sure they know what vessels were operating in waters near their areas of interest."
Harper arrived in Poland following the G7 summit in Germany, the second leaders' meeting without Russia.
He boarded the Fredericton on the second night of its two-week participation in the naval exercise that involves 17 NATO countries.
National Defence says the ship's deployment is part of Canada's response to Russia's military aggression towards Ukraine.
In a speech to the crew after returning to Gdynia, Harper praised them for their contribution to the moves in support of Ukraine.
"The Royal Canadian Navy's presence here is the physical demonstration that Canada stands up for what is right and good in our troubled world," Harper said in a prepared text.
He also expressed hope that Russia would one day emerge from Putin's rule, and his "absurd attempts to deny the reality" and the outcome of the Cold War.
"We look forward, some day, to a Russian government focused on delivering prosperity and democracy to the Russian people," Harper said. "I regret very much that this is not, and never will be, Mr. Putin's Russia."
Harper's first appearance of the day was for a morning briefing at 9:40 a.m. in the chiefs and petty officers' mess, two decks below the main deck. The media was allowed to watch the first five minutes.
The lounge was bustling before sunrise.
Sailors, men and women, circulated through the L-shaped compartment, no larger than a small, residential, basement family room with hardwood floors and green and brown panelled walls. A brown plaque on the door showed a prowling brown tiger and the motto: "Leadership. Professionalism. Attitude."
"We need to send a message, in my opinion, that NATO is still a strong entity," said Chief Petty Officer Rodney Helpard, 51, of Halifax, a 32-year navy veteran.
"We're hanging out in somebody's backyard," added Chief Petty Officer Rob Chiasson, 46, of Cape Breton. "We're just letting them know we're here, to knock on his door and say, 'hey, we're here playing in the yard'."
For Petty Officer First Class Karen Johnston, 52, Wednesday was a special day — it marked her 32nd anniversary in the Canadian Forces. She was one of three sailors to receive a special citation from Harper.
"How often does the prime minister ever come on and see a ship and stay for the night? And his wife came."
Also on HuffPost