VIRGINIA BEACH, Va. (WVEC) -- A 23-year-old man was sentenced Monday for stabbing two people in 2016.

According to evidence, Gregory Smith went to one of the victim's apartments after texting him wanting to buy some marijuana. While there, the three men smoked marijuana and chatted.

When Smith got up to leave, he pulled out a handgun and pointed it at the men. He demanded to know where one of the victims kept his rifle, and the victim told him he had sold it.

Swift made both men get on their knees and then stabbed them both in the back with a two-pronged knife. He then grabbed the victim's XBOX and ran away.

Both men survived after getting surgery and staying in the hospital for several days.

Swift pled guilty to charges of Malicious Wounding, Robbery of a Residence with a Gun and Use of a Firearm in Commission of a Felony. He was sentenced to 12 years in prison.