A St. John's judge said he felt compelled to sentence a man to eight years in prison for two armed robberies, to send a message to criminals after a rash of robberies in the area. 

Judge James Walsh handed the sentence to William Macauley, 42, of St. John's in court on Thursday. 

William Macaulay held up an an Esso gas station in St. John's on Sept. 29 and took about $200. After the robbery, Macaulay got into a cab and paid in fives. 

The driver felt that was strange, and Macaulay later called to thank him for not turning him in. Eventually, the cab driver called the police, who put Macaulay under surveillance. 

Police arrested Macaulay when he held up a pharmacy on Oct. 4 to steal narcotics. 

Between Aug. 5 and Nov. 15, there were 29 armed robberies in the St. John's area. 

Macaulay has had a long history of drug addiction. He said he started doing crack cocaine at the age of 17.

He also has accumulated a long criminal record, including four prior convictions for armed robbery. 

The eight-year sentence handed to him is his longest yet.