Steven McGarry's late winner gave Maurice Malpas his first victory as Motherwell manager after they scraped a CIS Cup win over Partick Thistle.
Richie Foran twice finished off Scott McDonald crosses to give Well a commanding early lead.
Jimmy Gibson's free-kick narrowed the deficit before the break and Mark Roberts' 25-yard drive gave the First Division side hope of an upset.
But McGarry slotted home a David Clarkson cross two minutes from time.
McDonald and Brian Kerr had gone close early on for the Scottish Premier League outfit.
And McDonald took advantage of a mix-up in the Thistle defence to run down on goal and squared the ball for Foran to roll the ball in off the far post.
Billy Gibson fired just past the upright from the edge of the box as Thistle responded.
But Motherwell doubled their advantage following a ruthless passing move.
New signing Keith Lasley emerged from a tackle with the ball and found McDonald, who crossed first time for Foran to steer the ball past Kenny Arthur.
However, Thistle hauled themselves back on level terms in strange circumstances after 24 minutes.
Jimmy Gibson's right-footed free-kick, close to the left touchline and 25 yards out, evaded both sets of players and Motherwell goalkeeper Graeme Smith to bounce into the far corner of the net.
Kevin McBride squandered a glorious chance to Motherwell's two-goal lead just before the break when he headed over the crossbar from close range.
Ross McCormack should have been awarded a penalty moments later when he was tripped in the box by substitute Scott McCulloch, but referee Kenny Clark waved play on.
And Thistle forward Roberts sent the travelling supporters wild by curling a 25-yard shot into the far corner in the 66th minute to equalise.
McDonald would have restored Motherwell's one-goal advantage in the 78th minute, but David Clarkson blocked his team-mate's drive.
However, McGarry pounced on Clarkson's cross, with two minutes remaining, to hand Malpas his first win in five attempts.
Motherwell: Graeme Smith, Paul Quinn (Fitzpatrick 50), Paterson, Craigan, Reynolds, McBride (McGarry 69), Lasley, Kerr, Foran, McDonald, McCormack (Clarkson 58).
Subs Not Used: Meldrum, Soutar.
Goals: Foran 6, 16, McGarry 88.
Partick: Arthur, Sives, Robertson (McCulloch 33), Brady, Boyd, Ferguson, James Gibson, Donnelly, Graham Gibson (Keogh 64), Roberts, Billy Gibson (Strachan 83).
Subs Not Used: Tuffey, McConalogue.
Goals: James Gibson 25, Roberts 66.
Ref: K Clark