A shirtless man armed with a knife has been arrested after four hours of police negotiations at commission flats in Flemington, in Melbourne’s northwest.

Police and the dog squad responded to the block on Racecourse Road, Flemington, around 1pm, after reports the man had locked himself inside an apartment.

Video obtained by 9NEWS shows officers speaking with a partially masked-man holding a knife in the lobby of the building.

A man has been arrested after police negotiations at a Melbourne apartment building. (9NEWS)

Witnesses said the man was threatening people getting out of the lifts and stopping others from entering.

“He came down with some mask on…and he started swinging his knife and everyone was scared,” witness Kadir said.

The stand-off blocked residents, among them a bride, from leaving the building as negotiators worked to resolve the situation.

No one was injured.

The man was arrested just before 5pm and has been taken to hospital for psychiatric assessment.