Keith overcame the handicap of playing for an hour with 10 men after Adam Clark was red-carded to produce a rousing performance to secure victory against Rothes.
Top scorer Luke Barbour and Donnie Fraser both scored first-half goals and, despite Rothes pulling one back through substitute David McNamara, the Maroons moved up to seventh in the league table.
Keith manager Allan Hale praised his side afterwards, saying: “It was a great performance, playing an hour with 10 men. I felt Adam Clark’s red card was a bit harsh but we responded well.”
The Maroons had several early chances before the game was turned on its head on the half-hour mark when defender Clark received a straight red card for a challenge on Blair McDonald.
That galvanised the home side and within a couple of minutes they went ahead, top scorer Barbour slotting home his 14th goal of the season.
Just before half-time a defensive error saw Donnie Fraser pounce to ram home his seventh goal of the season from close range to put the Maroons in the driving seat.
Rothes pulled a goal back through McNamara but it was not enough for the Speysiders.
Rothes caretaker-manager Derek Thomson said: “It was a battling display from both teams, with the sending-off changing the game.
“We gave away poor goals and that’s been the story of our season but Keith sat in well and we struggled to break them down. It was a good effort from the lads.”