The prime minister’s security service said Arnoud van Doorn, the leader of The Hague Unity Party, was arrested on Sunday.
He “displayed suspicious behaviour” as he walked through the same area of the city as Mr Rutte, the service said.
Mr van Doorn was released on Monday after a police interrogation.
His lawyer Anis Boumanjal told the BBC he should not have been arrested because there was no reasonable suspicion of guilt.
The arrest was reported on Tuesday, a day after Dutch media said Mr Rutte had been given extra security over fears that he may be the target of an attack or kidnapping by a criminal gang.
Mr Rutte, 54, has been followed by so-called spotters linked to a drug trafficking gang, the De Telegraaf newspaper reported on Monday.
Telegraaf journalist Mick van Wely told broadcaster NOS the matter was being taken “very seriously”. NOS confirmed the report but Dutch security authorities and the prime minister declined to comment.
Outside parliament on Monday, as he arrived for coalition talks, Mr Rutte told journalists: “Safety and protection are issues never to be discussed in public.”
‘It was very dramatic’
Prosecutors in The Hague confirmed the arrest of Mr van Doorn to Dutch media and said an investigation was still ongoing.
A spokesperson said there was suspicion that Mr van Doorn was trying to gather information for “preparation of attempted murder”. No further details were provided.
Prior to his arrest, Mr van Doorn had been in the Hague for about an hour, his lawyer said. He said Mr van Doorn had a coffee at a cafe and made some enquiries at a fitness centre before walking past a BMW thought to be chauffeuring Mr Rutte.
Mr van Doorn’s lawyer said the arrest was an overreaction to the recent concerns surrounding the safety of the prime minister.
“They weren’t reasonable in how they handled the case. It was very dramatic,” Mr Boumanjal said. “They detained him for 30 hours.”
The reported threat to Mr Rutte follows the murder of prominent Dutch journalist Peter R de Vries, who was known for investigating the criminal underworld in the Netherlands.
The shooting in July stunned the country, where gun violence is rare but killings linked to organised crime have become increasingly common in recent years.
In office since 2010, the conservative prime minister is fond of cycling and is often seen riding to appointments in the Hague with little or no security in sight.
The Telegraaf said Mr Rutte had been protected with “visible and invisible measures” since the threats had become known.
Telegraaf journalist Mr van Wely said “spotters” linked to a drug trafficking network known as the Mocro Mafia had been seen near Mr Rutte.
“That is so worrying for the security services,” he told NOS.
In the criminal world, spotters are people who gather intelligence in preparation for a criminal act, such as an attack or kidnapping.
Dutch far-right leader Geert Wilders, who is usually an ardent critic of Mr Rutte, wished him well, calling the reports “terrible”.
Mr van Doorn used to be a leading member of Mr Wilders’ far-right Freedom Party, which is known for its anti-Islam stance. But in 2013 Mr van Doorn surprised his party by converting to Islam, and told the BBC he had turned his back on his former life.
Mr Rutte vowed to get tough on criminal gangs after the murder of Mr de Vries.
Mr de Vries had been advising a former gang member, Nabil B, who was testifying in the trial against Ridouan Taghi, described as the Netherlands’ most wanted criminal.
The Moroccan-Dutch suspect and his associates are currently on trial for murder and drug trafficking.
The case has put the Netherlands on edge after Nabil B’s previous lawyer, Derk Wiersum, was assassinated in front of his Amsterdam home in September 2019.
It has heightened concerns about the criminal underworld in the country, which one police union chief compared to a “narco-state” in 2019.