A provincial court judge has struck down evidence obtained during the detention of a man suspected in four violent home invasions on the northeast Avalon Peninsula.

Judge Mike Madden ruled Tuesday that a Royal Newfoundland Constabulary officer went too far by removing a ringing phone from a suspect's pocket and reading a text message on the screen.

That text was later used as part of the basis to obtain a search warrant, which produced some of the evidence expected to be presented at trial in St. John's.

Four men — Gary Hennessey, Mitchell Nippard, Tyler Donahue and Abdifatah Mohamed — are charged with more than 100 offences related to four armed home invasions last winter.

Hennessey was stopped by police less than a kilometre from a crime scene on Angel's Road in Paradise on Feb. 10, 2017.

While RNC Const. Michael Hunt was detaining him, his phone rang.

The Crown believes Tyler Donahue, who is not being held in custody, is the person who sent a text message to another one of the men accused in the string of home invasions. (Sherry Vivian/CBC)

Hunt saw a text message from a man named Tyler, giving his location.

The police officer testified he was searching Hennessey for safety reasons and understood the phone was not a weapon when he removed it from his pocket.

Madden said the circumstances would have been very different if Hennessey was being placed under arrest at the time.

Abdifatah Mohamed, a fourth man charged, is representing himself at trial. (Sherry Vivian/CBC)

Since he was only being detained, Madden said Hunt did not have the right to look at the screen and memorize its contents.

With that piece of evidence excluded, defence lawyers for the accused men can now file submissions to strike down other evidence — that was obtained with the search warrant.