A man in an electric wheelchair was being helped onto an MTA bus in Brooklyn on Monday when he accidentally dropped his gun, which went off inside the vehicle and sent the other passengers into a panic, police said.

The bus driver had just activated the vehicle’s ramp and was assisting the disabled man to board at a stop near the corner of Fulton Street and Howard Avenue in Bedford-Stuyvesant around 2 p.m., officials said.

As the man wheeled his way onto the bus, his gun tumbled to the floor and discharged a round inside the vehicle, authorities said.

The man quickly reached down and picked up the weapon before rolling back down the ramp and disappearing, police said.

Several passengers who were on the bus ran off in a panic, officials said.

Police were still questioning witnesses Monday afternoon.

No arrests have been made. The suspect in the wheelchair is said to be in his 30s or 40s, according to police.