A 30-year-old Nova Scotia man is facing charges in connection with the armed robbery of a pedestrian Wednesday morning in Moncton, N.B.

Police say a man walking on Shediac Road around 8:30 a.m. was approached by a lone male, who allegedly pulled out a knife and demanded money.

When the victim indicated he didn't have any cash, the man followed him to a nearby gas station so that the victim could withdraw money from an ATM, Cpl. David Swansburg said in a statement.

As they were inside the store, the victim was able to tell the employee that he was being robbed, and the employee called 911.

Codiac Regional RCMP and the RCMP's Police Dog Services responded and the suspect was tracked to a local hotel, but was not initially located, Swansburg said. About four hours later, RCMP pulled over a vehicle on Highway 16 near the Confederation Bridge and arrested a 30-year-old man and a 27-year-old woman.

Demarqus Beals of Dartmouth, N.S. appeared in Moncton Provincial Court on Thursday and was charged with armed robbery and five counts of breaching a recognizance. He was remanded into custody and will return to court on Friday at 1:30 p.m.

The woman was questioned and later released.