Two men who robbed a Halifax-area family at knifepoint but managed to elude arrest and walk away from RCMP headquarters after hiding in the trunk of a car towed to the impound lot have been sentenced to prison time.

Jason Matthew Halsey and Clinton James Christie were sentenced earlier this spring in Nova Scotia Supreme Court to seven years and eight years, respectively. A ruling by the judge in the case was released this week.

They had pleaded guilty to a series of charges, including break and enter, confinement, robbery and wearing masks in the commission of a crime.

The pair took part in a violent home invasion in Upper Sackville in June 2015 and were helped by a third man, police informant Derek MacPhee.

MacPhee later received immunity from prosecution in return for his testimony at the first-degree murder trial of Jimmy Melvin Jr., who was acquitted by a jury earlier this month.

Derek MacPhee. (Facebook)

In an agreed statement of facts in the home invasion case, the court was told MacPhee stole a getaway car for the other two men but didn't want to participate any further in the crime. He got Halsey and Christie a black Mazda Miata, which they drove to the home in the early morning hours of June 5, 2015.

The men got in through a patio door, according to the statement of facts, and confronted the couple in their bed, holding knives to their throats while they demanded jewelry, drugs and cash. They tied up the couple and their 13-year-old son, took their cellphones and cut the phone lines to the house.

The family believes they were targeted because the thieves appeared to have specific knowledge of their valuables.

After the home invasion, Halsey and Christie met up with MacPhee in the parking of a nearby pizza restaurant. The family had freed themselves and followed MacPhee, who was driving a rented Chrysler away from the crime scene.

Hiding in the trunk

Halsey and Christie abandoned the Miata and got in the trunk of the Chrysler. RCMP caught up with the car and found MacPhee and his girlfriend inside.

They were arrested and the car was taken to a police impound lot. Officers did not realize Halsey and Christie were still in the trunk.

The two men were able to escape that evening. They were captured on security video walking away from RCMP headquarters. Halsey was arrested several days later and Christie the next month.

Police recovered some of the stolen items when they searched the car. Other items were recovered when Halsey and Christie were eventually arrested.

A publication ban has been imposed to protect the identities of the family, the owner of the Miata and witnesses who saw the robbers leaving the home.