Quarsh Panaka is the captain of the Royal Naboo Security Forces and head of Queen Padmé Amidala's personal guard during the Trade Federation blockade and invasion in The Phantom Menace (1999). Hugh Quarshie plays him.
The decoy system
His most consequential contribution is the handmaiden arrangement: a rotating set of body doubles, chief among them Sabé, trained to impersonate the Queen while Padmé moves among her own staff in disguise. It is Panaka's protocol, it works repeatedly across two films, and it is the reason a monarch of a lightly armed pacifist world survives an occupation.
The professional pessimist
He spends the film warning that Naboo's forces are too small, that the Federation is better armed, and that the Queen is taking unacceptable personal risk — and he is correct on every count. That he is overruled by a fourteen-year-old who then wins is the film's point about Padmé, but it does not make him wrong, and the writing is careful enough not to make him a fool.
Afterwards
He is succeeded as Padmé's chief of security by his nephew Gregar Typho by the time of Attack of the Clones. Later canon material places Panaka in Naboo's planetary government and, uncomfortably, on increasingly good terms with Palpatine's regime.