In 1913, Albert Marr found an orphaned baboon on his family form near Pretoria, South Africa. Marr named his new friend "Jackie" and the two became inseparable. When Marr joined the 3rd South African Infantry Regiment at the start of World War I, he naturally brought Jackie with him. From Mysterious Universe:
[Jackie] started his tour by learning how to light cigarettes for the soldiers, then graduated to carrying supplies back and forth and night sentry duty, easy for him with his heightened senses, becoming a valuable member of team. He even joined the soldiers at the mess hall, where he actually learned how to use a knife and fork as well as a tea-cup, but he was about to take his soldier career even further. When the regiment saw their first real combat action in Egypt in the Battle of Agagia against the Senussi, allies of the Ottoman Empire, in February of 1916, Marr was reportedly injured in battle and Jackie stayed at his side to care for him and lick his wounds until medics arrived. The regiment then found themselves in France at the Western Front, where some of the most vicious fighting of the war was going on at the time. This was a place of terrifying trench warfare, where bloody battles of attrition were carried out that routinely had casualty rates of up to 80%, leaving the terrain littered with bodies, so it seems like hardly the place where a pet baboon would be welcome. Yet Jackie was soon in the fray, allegedly taking part in the Battle of Delvile Wood in July 1916, as well as the Battles of Arras in April 1917, and the Spring Offensive in April of 1918, with Jackie allegedly an indispensable sentry guard. During one particularly intense and ferocious battle during the Spring Offensive, the baboon was seriously wounded by shrapnel after purportedly actually building a wall around himself to avoid enemy fire.
Jackie lost a leg in the battle but eventually returned to his daily duties. For his service, he earned the rank of Corporal and received a Pretoria Citizens Service Medal and other honors. After Marr and Jackie were discharged, they both received military pensions and returned to their farm where Jackie eventually died in 1921.
"The Strange Story of Jackie, the Baboon War Hero" by Brent Swancer (Mysterious Universe)