OAKLAND (CBS SF) – A man who lured his victim by placing an ad for a car on Craigslist was sentenced Monday to 12 years in federal prison for robbing a man of his cellphone, a credit card and personal items, prosecutors said.

Tuan Ngoc Luong, a 38-year-old Castro Valley man, posted an ad on Craigslist in February 2015 stating that he wanted to sell his car, according to the U.S. Attorney’s Office.

READ MORE: Silicon Valley Antivirus Software Mogul John McAfee Found Dead in Spanish Prison Cell After Extradition to U.S. Approved

An unsuspecting potential buyer saw the ad and contacted Luong and the two men agreed to meet at the Castro Valley BART Station, prosecutors said.

When the man arrived, Luong told him that he was a sheriff’s deputy and urged him to take the car on a test drive, according to prosecutors.

During the test drive, Luong claimed he needed to stop at home to get the title to the car and instructed the victim to stop in a secluded residential neighborhood, the U.S. Attorney’s Office said.

After they stopped and got out of the car, Luong pulled out a black semi-automatic handgun, pointed it at the victim demanded money and robbed the man of a cellphone, credit card and a number of personal items before fleeing in the car, prosecutors said.

READ MORE: Contra Costa Authorities Seize Hundreds of Pounds of Fireworks Ahead of July 4th

Luong was captured two days later as part of an undercover sting operation after an Alameda County sheriff’s deputy posed as an interested buyer in response to the same Craigslist advertisement, according to prosecutors.

When Luong arrived to meet the prospective “buyer” he was arrested with a black semi-automatic pistol clipped to his belt on the small of his back, according to the U.S. Attorney’s Office.

Luong was convicted by a jury on Jan. 28 and was sentenced by U.S.

District Court Judge Haywood Gilliam Monday.

Luong previously was convicted last September for being a felon in possession of a firearm and ammunition, prosecutors said.

MORE NEWS: San Francisco Serial Shoplifting Suspect Charged With 15 Counts, Faces Arraignment Wednesday

© Copyright 2016 by CBS San Francisco and Bay City News Service. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.