The most intelligent monkeys are baboons.
One of the most remarkable examples was a Chacma baboon named Jackie, who was probably the only primate in history to reach the exalted rank of corporal in the army – and end up with a war medal.
The baboon was discovered by Albert Marr on his farm in Villeria, in Pretoria, South Africa, a few years before the outbreak of the first world war and the two very quickly became attached to each other.
The animal turned out to be exceptionally intelligent and took so readily to training that when Marr joined the Third South African Infantry Regiment he took along his companion as well.
The friendly monkey was an instant success with the soldiers, and it wasn’t long before he was made the regimental mascot.
As a result he was issued with rations, a pay book and a specially made uniform.
Private Jackie was the perfect recruit.

On the parade ground he was always smartly turned out every time he saw a passing officer he would stand to attention and give a very correct salute.
He was also very proficient at lighting cigarettes for his comrades in arms.
In August 1915 the two privates sailed with their regiment for the war zone and during the next 3 years the inseparable pair saw front line service against the Turks and Germans and were also with the brigade during a campaign in Egypt.
The baboon proved to be an extremely valuable acquisition because he was a first class guard.
With his acute hearing he could detect the enemy long before his human companions, and when he picked up anything he would either give a series of short barks or tug urgently at his master’s tunic.
In April 1918 both privates were injured together.
It happened in the Passchendale area in Belgium.
The brigade had come under heavy fire and, as the air filled with the sound of deafening explosions, Jackie could be seen trying to build a fortress of stones round himself for protection.
He never finished it – suddenly a shell exploded close by and a chunk of shrapnel hit him in the right leg, partly severing it.
The same shell also wounded his master.
Both soldiers were rushed to a British casualty clearing station where the baboon’s leg was amputated by a Dr RN Woodsend who later wrote an account of the incident:“
“We decided to give the patient chloroform and dress his wounds. If he died under the anesthetic perhaps that would be the best thing. As I had never given anaesthetic to such a patient before, I though it would be the most likely result. However he lapped up the chloroform as if it had been whisky and was well under in remarkably short time. It was a simple matter to amputate the leg and dress the wounds as well as I could.”

Jackie made a full recovery, but it was the end of active service for Jackie & Albert, with the war coming to an end shortly afterwards.
They were shipped to England, where Jackie became a celebrity, receiving much publicity in the English newspapers.
From early September to 14 February 1919, Jackie and Private Marr were lent to the Red Cross by the War Office and the South African Government for the purpose of collecting money for the sick and wounded soldiers.
On 5 May 1919, Jackie and Albert were on their last leg of their journey home to Pretoria and Cheshire Farm.
Jackie had been officially discharged at Maitland Dispersal Camp in Cape Town on 26 April.
On his arm, Jackie wore one gold wound stripe and three blue service chevrons, indicating three years front-line service.
At Maitland he received the usual parchment discharge paper, military pension, plus a Civil Employment Form for discharged soldiers.
After their arrival home, Jackie was again feted and became the centre of attention on occasions such as the parade to welcome back officially the 1st SAI Brigade and at the Peace Parade in Church Square, Pretoria on 31 July 1920, where he received the Pretoria Citizen’s Service Medal .
Jackie died a day after a fire destroyed the farmhouse on 22 May 1921 and Albert Marr passed away at the age of 84 in Pretoria in August 1973.
[Source]