A bizarre argument about whether Christians and Muslims should marry is believed to be what led to a shooting at a Melbourne café.

The interfaith dispute erupted between customers at the Babylon Coffee Shop in Broadmeadows, 16km from Melbourne in June 2018, the Victorian County Court heard on Friday.

The gunman, Nasser El Kheir, pleaded guilty to conduct endangering life and being a prohibited person in possession of a firearm.

Nasser El Kheir (pictured) pleaded guilty to conduct endangering life and being a prohibited person in possession of a firearm

At the time of the incident, El Kheir was kicked out of the cafe and became 'highly agitated, gesticulating and yelling', court documents show.

The 56-year-old is then said to have gone home, grabbed a handgun and returned to the café.

When he returned to the coffee shop he fired two shots at the ceiling near patrons, although none were injured.

He is believed to have yelled: 'Where is the motherf***er? I'll kill him'.

The incident took place at Babylon Coffee Shop (pictured) in Broadmeadows, 16km from Melbourne in June 2018

The owner of the café attempted to stop El Kheir from walking to the rear of the premises, but was pushed aside.

El Kheir then turned and fled the scene.

An extensive police search failed to find the gunman, but El Kheir eventually handed himself in almost a week after the shooting.

The firearm has not been recovered.

There were also claims aired in court a man at the cafe had gestured he would cut El Kheir's throat.

At the hearing at Victorian County Court (pictured) Judge Gabriele Cannon said she was satisfied El Kheir demonstrated remorse

At a hearing, Judge Gabriele Cannon said she was satisfied El Kheir demonstrated remorse but it was concerning he was affected by alcohol at the time of the shooting.

The judge wanted the firearm surrendered to police but recognised people were hesitant to hand in the weapon, worried they would be criminally charged.

She ordered El Kheir to undergo an assessment for a community corrections order but did not rule out a term of imprisonment.

He is due to be sentenced on April 30.