Eight Gavin Henson penalties saw the Ospreys win the Heineken Cup Pool Four basement battle at St Helen's.
HEINEKEN CUP POOL 4
Ospreys (12) 24
Pens: Henson (8)
Harlequins (7) 7
Try: T Williams
They had a disastrous start as Dafydd James' tackle set up Tom Williams for a first-minute try for Harlequins.
But the home side turned on the pressure up front, and Nick Easter was sin-binned as the Quins began to crack.
Henson took advantage of his forwards' efforts, landing four penalties in each half to keep the Neath-Swansea side's slim quarter-final hopes alive.
Harlequins' Welsh exile James, looking to make an impression against current Wales centre partnership Henson and
Sonny Parker, helped give the visitors their ideal start.
He hammered Henson in a first-minute tackle, shaking the ball loose and putting Stefan Terblanche under pressure.
The wing's attempted clearance kick was charged down by Quins full-back Williams for a try, converted by Jeremy Staunton.
The Ospreys rallied, and with the Quins' line under pressure flanker Easter was sin-binned for killing attacking ball.
James Bater was held up over the line as the home side went for a scrum, but the Ospreys went on to score two Henson
penalties in Easter's absence to narrow the gap to a point.
The Ospreys' forward power proved too much for the Quins
The pressure continued to grow from the home side, particularly in the scrum, and though the Quins kept their line intact two
more Henson penalties gave the Ospreys a 12-7 half-time lead.
The visitors' pack stepped up to the forward challenge in the second period, but Staunton missed a penalty shot and Henson
extended the Ospreys lead with his fifth goal.
The home side kept the play tight, exerting pressure up front and kicking to the corners.
The English side had no answer, and two more Henson penalties - the second after a fine Shane Williams run - made the result secure.
"My goal is to be in the Wales Six Nations side and be first-choice goal kicker," said Henson. "My mistake led to their try, but they didn't look like scoring after that.
"It was a concern that we didn't get a try, but we were professional and now we've got a first win in Europe we have a chance to go through.
"Harlequins had nothing to offer and we can go there next week with confidence.
"I think we can do Castres at home, then away against Munster anything could happen."
Harlequins chief executive Mark Evans was bitterly disappointed with his side's display.
"There are three things that control field position in the modern game -
penalty counts, line-outs and ball retention," he said.
"Our line-outs were okay, but the penalty count was desperate and our ball
retention was poor and that meant equally poor field positions and having to
kick the ball away to clear our lines.
"It's not because Henson is a good kicker that the Ospreys won the game -
they did so because they controlled territory and when you do that you'll knock
"We never got Dafydd James, George Harder and Will Greenwood into the game in attack."
Ospreys: Durston; Terblanche, Parker, Henson, S Williams; M Jones, Spice; D Jones, B Williams (capt), A Jones, Newman, Thomas, Bater, Pugh, R Jones.
Replacements: Davies, Millward, James, Tait, Tandy, A Williams, Seveali'i.
Harlequins: Williams; Harder, Greenwood, James, Keogh; Staunton, So'oialo; Worsley, Fuga, Jones, Winters, Miall, Easter, Vos (capt), Diprose.
Replacements: Hayter, Dawson, Rudzki, Sherriff, Dunne, Deane, Duffy.
Referee: Franck Maciello (France)