Robber is just like real estate -- it's all about location, location, location.

That's a lesson one teenager learned the hard way.

Victor Martinez-Herrera, 18, was arrested after he was caught in the act trying to rob taxi driver Ralph Valletta in his cab in Reading, Pa. on Monday night by an officer in his squad car right behind them.

Martinez-Herrer, sitting in the back seat, pointed a gun at Valletta's head and shouted:

Give me all your money, man... I need it all right now if you don't want to die."

Berks County Deputy Terry Ely happened to be sitting in the car behind the pair and realized something may be amiss because the vehicle never moved after the light turned green.

As Valletta turned over $11 to Martinez-Herrer, Ely flashed his car's lights and stepped out to survey the scene. "I stood in the back to try and hear the conversation ahead of time so knew what I was getting myself into," Ely said. "At that point, I heard the driver say, 'Just please don't shoot me.'"

Ely pulled out his gun, ordered Martinez-Herrera out of the car and called for backup.

Valletta, who's been held up two other times in his cab, said the incident shook him. "I almost had a heart attack in the car. My heart was beating," he said, You know, when that gun's pointed at your head, your body is doing things."

More From ESPN Western Colorado