Luke McCowan netted a second-half brace against former club Ayr as Dundee leapfrogged their opponents to the top of the cinch Championship table thanks to a 2-0 victory at Somerset Park.
Both sides were reduced to 10 men, with the visitors holding on for 44 minutes with a man disadvantage after Josh Mulligan was shown a straight red card midway through the first half for a late tackle from behind.
The hosts also had a player sent off as David Bangala picked up a second caution just after the hour.
Moments after that red card, Dundee came close to opening the scoring when Ryan Sweeney’s header was saved. They continued to press and were rewarded with a goal for McCowan, who slotted Zak Rudden’s assist into the bottom corner after 68 minutes.
McCowan doubled his tally with five minutes left for his sixth goal of the season in all competitions as Dundee extended their unbeaten league run to seven matches to go top.