Napoleon distinguished himself as a young artillery officer, mercilessly driving the British out of a French port, and drew the attention of the upper echelons. When the French republic's government was threatened by a mob, one general recommended that Napoleon be given command of the garrison in Paris.
Napoleon's army stood steady with orders not to fire until fired upon. When a weapon was fired from the crowd, Napoleon's troops fired back, dispersing and pursuing the mob.
The assembly was forever grateful after that, giving Bonaparte greater and greater responsibility, until the army was his instead of the government