Dundee ended 10-man Dunfermline’s winning run with a 4-3 victory in the Ladbrokes Championship.
Dunfermline almost claimed a point after fighting back from 4-1 down following the dismissal of forward Greg Kiltie.
Pars defender Danny Devine gifted Dundee a 15th-minute lead by sliding Declan McDaid’s cross into his own net.
But Dunfermline, who had won their three previous games, were level within seconds as Ryan Dow stabbed home his fifth goal of the season.
Dundee restored their lead after 25 minutes when Cammy Kerr crossed and Kane Hemmings left goalkeeper Ryan Scully helpless with a powerful header.
The dangerous McDaid set up the third after 34 minutes as Paul McGowan profited from Danny Johnson’s mishit shot.
Dundee’s top scorer Johnson struck his seventh goal of the season within seconds of the restart to make it 4-1, firing home after Hemmings’ attempt had been blocked.
Kiltie was sent off after 62 minutes for a second bookable offence, but Kevin Nisbet soon slotted home his 11th goal of the campaign to give Dunfermline hope.
Lewis Martin reduced the deficit further with a deflected 73rd-minute shot, but Dundee held on for a first win in five games.