Fired up after a debate about whether Christians and Muslims should be allowed to marry, a man grabbed a gun and shot two rounds in a cafe in actions that have cost him his liberty.

Melbourne man Nasser El Kheir was on Tuesday handed a one-year prison term for his offending in June last year at Broadmeadows' Babylon Coffee Shop.

"An argument started between you and a number of patrons about marriage between Christians and Muslims. You became highly agitated, gesticulating and yelling," County Court Judge Gabriele Cannon said while sentencing.

El Kheir, then 55, was escorted from the cafe by the owner and his brother, but returned five minutes later with a black handgun that he produced from his jacket.

During the 40-second episode, the "heavily intoxicated" El Kheir fired two shots while yelling "where is he?".