A suspected handgun was pointed into the face of an officer responding to reports of electric bikes being ridden dangerously, police have said.
Greater Manchester Police (GMP) said one of its officers, who had been called to the Great Clowes Street area of Salford at 12:00 BST and had approached a group of men, had a weapon brandished at him by one of them.
The officer deployed his Taser and called for back-up, which included armed response officers and a police helicopter. Following a chase, two men aged 20 and 21 were arrested on North George Street.
Police seized a gun on Upper Camp Street. A force spokesperson said tests were ongoing to confirm whether it was a real or imitation firearm.
GMP said an e-bike was also recovered on Fenny Street.
Det Supt Simon Moyles said: “This incident is entirely unacceptable and highlights how quickly situations faced by our frontline officers can escalate.
“Our officers work tirelessly to keep our communities safe and should never be placed in such danger.”
The two suspects were detained on suspicion of possessing a firearm or imitation firearm with intent to cause fear of unlawful violence or to enable another person to do so.