Training the peaceful villagers.
It's an old trope. Seven Samurai. Army of Darkness. The Three Amigos. You've seen it before.
The brave, capable hero teaches the quivering, cowardly farmers how to fight those nasty banditos that keep takin their wimmins.
Have you done this in a campaign? How did you handle it? How WOULD you handle it?
Is it even doable in a rush? Or is the idea laughably implausible?
I saw it done in a FR 3.5 game. The PC's were building a fortress and wanted to raise an modest army to go along with it (since bandits were a regular problem in the area). Rather than hire mercs, they decided to raise an army locally.
They recruited a couple hundred of the healthy adults and gave them weapons/armor they had salvaged from various defeated foes. So, each one got a suit of orc-grade chain mail, a rusty shortsword and club issued to them (while the forge at the new Keep was working on churning out more professional arms) and practiced with those weapons, and there were enough crossbows and polearms to let them all train on various weapons. They got a couple basic riding lessons on a few horses they had, some basic orientation in military bearing and first aid and tactics. They trained every day for a couple of months. It was narrated to the players like it was a "training montage" out of a movie or TV show (the players said they wanted to raise an army, and their characters would know more about it than them).
I basically took my experience from Basic Combat Training in the Army and my experience with the National Guard, and combined that with what D&D warfare is to get a simplified D&D "basic warrior training" and a local militia.
As for mechanics, they changed in class from Commoner 1's to Warrior 1's. Each peasant soldier had a suit of chain mail (the orc suits cleaned up and repaired a little), a shortsword and either a club (for those assigned militia/town guard duty, as a sort of patrolman's billyclub) or a crossbow (for those on patrol, to shoot at bandits).
Only a fairly small number of militiamen were on duty at any one time, a couple of 10-man patrols (with a PC sometimes leading them, so a few solo adventures of the PC and 10 NPC soldiers against some bandits), a dozen or so on duty at the keep & village as town/keep guards.
Each soldier got a tiny pittance of money, they weren't in it for the money, but was provided with shelter and food, and the benefits of greatly eliminating bandit raids on the trails meant merchants were more willing to come to town, increasing trade and making the militiamen richer because of their civilian livelihoods were better.