A Portland State University police officer has shot and killed a man who was reportedly trying to break up a fight after seeing his gun fall out of his waistband and onto the sidewalk.

The shooting happened outside the Cheerful Tortoise bar at 1.30am on Friday.

Police had been called there amid reports that a group of men were arguing outside.

When they arrived, the men were on the sidewalk in a standoff but had not yet started fighting.

The man in the beige shorts and grey t-shirt is who was carrying a gun which fell out of his waistband and sparked panic among the group, triggering the police officer to fire his own weapon. He is shown above left and right, getting back on his feet after the scuffle before being shot

Before the police arrived, the man seen trying to hold back his friend (in blue shirt) as he fought with others off screen

It became physical when one of the men picked up another's phone and slammed it onto the sidewalk.

In a video taken by a bystander, a group of men is seen scrapping on the sidewalk as two police officers watch and try to break them up.

The men all fell to the ground in a heap and the victim's gun fell out of his waistband.

Seconds later, as the men get back to their feet, one of the officers drew his gun. In the video, he is heard screaming: 'Drop the gun! Drop the gun!

The police officers tried to stop the fight before the men fell to the ground. Witnesses said someone shouted 'there's a gun'. One of the cops was then heard on the video screaming: 'Drop the gun! Drop the gun!'. The camera panned away before he fired his shot

The video panned away as the first shot rang out and then the bystander stopped filming. It is not clear how many shots the cop fired in total.

Witness Keyaira Smith has since told local network KTVZ that the man who was shot was merely trying to break the fight up.

Neither the officer nor the victim has been identified.

The university has not commented on the shooting other than to say that it continues to be under investigation.