Motherwell prepared for their League Cup semi-final meeting with Rangers with a hard-fought victory against Dundee United at Tannadice to leapfrog their opponents into fourth place in the Scottish Premiership.
The visitors were on the back foot early on but took the lead against the run of play with a well-worked free kick.
Lennon Miller picked out Dan Casey at the back post, and the centre-back steered a header across goal, where Tawanda Maswanhise was waiting to score.
United persevered and hit back 13 minutes later when Kristijan Trapanovski crossed for Sam Dalby to head in an equaliser.
The hosts should have taken the lead before the break, too, but Trapanovski and Will Ferry had goalbound efforts blocked by the Motherwell defence.
Jim Goodwin's side started the second half better as well, but they were undone by a mistake at the back by Emmanuel Adegboyega.
The centre-back was caught in possession by Maswanhise, who raced down the field and dinked goalkeeper Jack Walton to put Motherwell back in front.
United frantically tried to find another equaliser, but Kevin Holt's close-range effort past a post was as close as they came.