A 21-year-old and a 17-year-old were sentenced to prison for targeting seven men in an ill-advised robbery inside the courtyard of a Northwest Washington apartment building.

Torrell Page, 21, was sentenced to five years in prison after pleading guilty to robbery. His accomplice, 17-year-old Isaiah Harris, pleaded guity to attempted robbery and was sentenced to a two-year prison term, with all but six months suspended on the condition that he complete three years of supervised release.

According to court records, shortly after midnight on Oct. 13, Page and Harris staged their attack outside an apartment complex at 906 Gallatin St. NW.

Inside the courtyard, a group of Hispanic men was drinking alcohol and smoking cigarettes. One of the men walked to the back of the building to urinate in the same area Page and Harris happened to be scheming, court papers said.

Page pulled out what looked like a "long machine gun," grabbed the man and forcibly escorted him back to the courtyard.

Page pushed the man to the ground and stated, "Hands up or I'll kill y'all."

As Page trained his weapon on the victims, Harris rifled through their pockets and pilfered their personal items, including wallets, debit cards, cellphones and other items.

The pair then fled. The victims gave chase.

A minute or two later, a D.C. police officer in a marked cruiser spotted a group of men running on the 800 block of Farragut Street NW.

"They robbed us!" one of the victims yelled.

Police set up a perimeter and found the robbers hiding behind a home. Harris explained that he was hiding because he was being chased by some Hispanic guys.

Police recovered the victims' wallets and cellphones and a passport belonging to one of the men.

The weapon, which had been spray painted and taped over to look like a semiautomatic firearm, turned out to be a paintball gun.