The iPhone is great for playing games, taking photos, and messaging with friends, but who knew that it was also capable of stopping speeding bullets? This past week, a Fresno State graduate student’s life was potentially saved when an iPhone he was carrying in his pocket helped deflect a bullet fired at him during the course of an attempted robbery.

DON’T MISS: Drone accidentally catches man suntanning atop a 200-foot wind turbine

According to police, here’s how it all went down.

An armed attacker approached the aforementioned student from behind, gun drawn, and attempted to make off with his computer bag. During an ensuing struggle, the attacker pulled the trigger and shot the victim in the leg. The bullet proceeded to ricochetet off of the student’s iPhone which was thankfully nestled in his pants pocket.

Below is a front facing shot of the shattered iPhone.

iphone bullet shattered

While the victim does not want to make himself publicly known because his attacker is still on the loose, his roommate Faris Alotaibi told an NBC News affiliate that the iPhone quite literally saved his friend’s life.

“He was shocked and sweating. And he said ‘I got mugged. And the person who mugged me shot me in the leg,'” Faris said.

Faris didn’t see any blood.

“The jeans were torn open and he showed me his iPhone and I saw the bullet was really clear on it. So it saved his life,” Faris said.

Faris’ roommate told him, the gunman followed him to the door of their apartment. And grabbed the victim’s computer bag. The victim pulled the bag back. And that’s when the suspect shot him and ran off with the computer.

“The bullet shot and shattered the iPhone. He did not bleed. He was lucky,” Faris said.

In the wake of the robbery, the victim reportedly packed up his things and went home with no plans to return to Fresno State.