THE HEART-STOPPING moment a gun is pointed at another man’s head for a selfie has been caught on CCTV cameras at a US gun range.

Since being posted online it’s gone viral, with more than seven million views within three days.

In the vision a man can be seen picking up a firearm at the Top Gun Range in Houston, Texas.

He takes a selfie while holding the gun next to his chest before turning to point the weapon at the head of the man next to him.

“You can see where I got mad, watch his neck, watch my left hand,” the officer said, while filming the CCTV vision on his phone.

In less than a second, the shooting range officer jumped into action, grabbed the gun out of the man’s hand, and restrained him.

The officer then escorted the two men out of the range.

The video was posted on Facebook earlier this week and has since been seen more than seven million times around the world.

Thousands of comments have praised the officer for his quick action.

The creator of the viral post Andrew Register - a former US Army infantryman and a current firearms instructor himself - also praised the officer.

“I want to give a special shout to Scott at Top Gun shooting range. How he handled this situation was amazing,” he said.

“I didn’t post this video to bash the two individuals, this was to praise the range officer who saved the day. We salute you.”