He returned to the South Africa and back into the Union Defence Force ranks at the end of the war. He was commissioned and sent to England to train as battery commander as well as attending a staff officers course. He returned to South Africa in 1922 and was promoted to Adjutant of the South African Field Artillery. In 1930 he was a Lieutenant-Colonel of 1st Field Service Brigade in Ladysmith. He commanded Orange Free State Command from 1935 to 1937. Other positions held were Voortrekkerhoogte and Transvaal Commands. When war started he was promoted to Brigadier.
World War 2
In 1940-1941, during the East African Campaign, Pienaar commanded the 1st South African Infantry Brigade. He fought in the battles of El Wak, The Juba, Combolcia and Amba Alagi. After Amba Alagi fell, the brigade was dispatched to Libya. In 1941-1942, during the North Africa Campaign, Pienaar fought in the battles of Sidi Rezegh and Gazala. On 10 March 1942, he was promoted to Major-General GOC1st South African Infantry Division, which he led in the battle of Gazala, the retreat to Egypt, the defence of El Alamein and the final battle of El Alamein. He was twice awarded the DSO and twice mentioned in dispatches for his service in North Africa. He was recorded by the press after El Alamein as saying, "Rommel will not get to Alexandria, he will not get the Canal, and he will never dine in Cairo - unless as a tourist." On 20 November 1942 he was appointed Companion of the Order of the Bath "in recognition of the supreme gallantry and magnificent achievements of British and Dominion Troops and their Commanders in the present operations in the Middle East". During the early stages of the North African campaign, the South African 5 Brigade had been destroyed on 23 November 1941, at Sidi Rezegh and, on 21 June 1942, the 2 Division, with 4 and 6 Brigades under command, surrendered at the fall of Tobruk. On the other hand, Ronald Lewin, who took part in the entire campaign, writes: "what is striking... is how often the British would squander a complete armoured brigade in some useless assault on a fixed position." Pienaar simply did not buy into the "Up Guards and at 'em!" approach of the British, which led to the decimation of the Commonwealth and Indian divisions that bore the brunt of so much of the fighting in the Desert War. "You know the three things I hate in this world—British lords, British generals and these bloody Guards!" he told Brigadier E. P. Hartshorn. "The burden of blame" for the loss of Tobruk in 1942, Churchill wrote in volume 4 of his memoirs, The Hinge of Fate, "falls upon the High Command rather than on General Klopper and still less on his troops."
Death and legacy
In 1942, Major General Pienaar was killed in an air crash in Kenya on his way back to South Africa. The plane crash occurred early Saturday morning in Kavirondo Gulf at Lake Victoria killing him and eleven South African officers and men. The plane crashed 16 km from the airfield at Kisumu when a combination of pilot fatigue and an electrical fault in the undercarriage which could not be raised, resulted in a loss of speed and failure to maintain height and it flew into the water. He was survived by his wife Norma. Pienaar was arguably one of South Africa's most charismatic and popular military commanders. An infantry regiment, exhibition hall at the South African National Museum of Military History and a suburb of his home town, Bloemfontein, were later named after him. Sam Brewer, war correspondent for the Chicago Tribune, wrote in an obituary that Pienaar was "acknowledged by all the military authorities...as one of the best fighting leaders the British have found in this war. He was every inch a soldier and a man, and on top of that had a quality not always found in a tough general—he was loved like a father by his men.... More than once he had hard words with higher authorities when he thought insufficient attention was being paid to the safety and comfort of the footsloggers who were bearing the brunt of the fight. Two points struck everybody who met Dan Pienaar—first his disregard for personal danger; second his solicitude for his men."