It was the Senegalese defender’s second winner of the season after his late header against Orlando Pirates a few weeks ago.
Stars will feel hard done by the loss as they played with some commitment, despite being a man short for most of the second half after Phelelani Mpangase was shown a red card on 64 minutes.
It was the visiting team that netted first when Sibusiso Msomi scored with a tame shot which appeared to have deflected off a United defender in the 49th minute.
The home team wasted numerous chances, with Felix Obada and his Nigerian countryman Prince Olomu missing clear-cut chances in both halves.
The turning point of the match was Mpangase’s red card for a late tackle on Kurt Lentjies. This gave the home team the advantage, which Obada eventually capitalised on with a left-footed shot in the 86th minute.
With the game looking set for a draw and Stars looking tired and desperate to grab a draw, the home team piled on the pressure which eventually led to the late winner by Diouf.