Cowdenbeath secured First Division safety and consigned Dunfermline to a relegation play-off with victory against 10-man Hamilton.
Stevie May put the hosts ahead midway through the first half but Andrew Ryan was soon dismissed for violent conduct.
Scott Linton levelled three minutes into the second half and goals from Craig Moore and Marc McKenzie gave the visitors all three points.
And the Pars' defeat by Airdrie ensures that Cowden move out of the second-bottom place.
Cuthbert, Gordon, Canning, Devlin, Hendrie, Routledge, Gillespie (Longridge 63), Crawford, Mackinnon, May, Ryan. Subs Not Used: Christie, McMann, Lyon, Brophy.
Ryan (31). Goals: May 27.
Flynn, Brett, Armstrong, O'Brien, Adamson, Milne (McKenzie 46), McAllister, Miller (Coult 46), Ramsay (Stevenson 64), Linton, Moore. Subs Not Used: Colin Stewart, Cowan.
Ramsay, Brett, O'Brien.
Linton 48, Moore 72, McKenzie 84.