Albert Ze Meyong's last-gasp penalty - one of four in the match - secured Braga a controversial 3-2 derby victory over Guimaraes which saw four players dismissed as the hosts moved to within three points of the top of the Portuguese Liga Sagres on Friday.
Guimaraes had taken the lead through Melo Rui Miguel in the 18th minute butBraga were level with their first spot kick of the night, Osorio Alan firing home five minutes from the break.
The visitors shot themselves in the foot in the 77th minute when Valdomiro was sent off for hauling down Wason Renteria in the area and Meyong - who had only come on minutes earlier - duly converted his first spot-kick of the night.
Guimaraes thought they had done enough to snatch a point when Ricardo Soares Andrezinho levelled matters from the spot in the second minute of stoppage time.
Alberto Rodriguez was shown a yellow card by referee Artur Soraes Dias in the incident who, thinking the Braga player had already been booked, then brandished the red card before being informed by his assistant of his error. Five minutes later Braga were awarded another penalty which Meyong put away again to hand them all three points.
To add insult to injury Andrezinho was shown a second yellow for the foul while Yves Hadley Desmarets and Artur Joao Alves all saw red for their protests.
There was an additional moment of controversy in the match when Dias awarded a penalty to Guimaraes for a handball by Pinheiro Moises but, after consulting his assistants, called over both team captains to announce he was rescinding his decision.
Braga are now three points behind leaders Benfica, who have a game in hand.
Sporting Lisbon strengthened their grip on fourth place with a 5-0 thrashing of Rio Ave with a hat-trick from Yanick Djalo and further goals by Liedson and Felipe Joao Moutinho. The home side played the last eight minutes with 10 men following the dismissal of Marat Izmailov.
Elsewhere, Edgar Costa scored the only goal as Nacional won 1-0 at home to strugglers Leixoes.