A man has been caught with a sub-machinegun in his bag at a major shopping centre in Sydney's inner west, police say.

As shoppers were heading to Marrickville Metro at lunchtime on Wednesday, the man travelled to the shopping centre by taxi with a Thompson-brand fully automatic sub-machine gun,148 rounds of .22 calibre ammunition and 44 shotgun shells.

Marc Avidov, 41, met officers involved in a police operation from the State Crime Command's Firearms Squad and Tactical Operations Unit inside the shopping centre car park on Murray Street.

Police say they searched his bag and found the weapon and ammunition. Mr Avidov was convicted three months ago of possessing a police baton.