Northampton kept their Heineken Cup hopes alive as they beat Castres to go second in Pool Four but they failed to earn a bonus point, which could prove crucial come the final reckoning.
The sides were level at the break after a brace of penalties apiece from Stephen Myler and Rory Kockott.
Myler edged the hosts back in front shortly after Northampton captain Dylan Hartley was held up over the line.
And three Ryan Lamb penalties saw them home despite two more from Kockott.
Saints, who travel to bottom side Glasgow on the final weekend, are on 14 points, five behind leaders Ulster, who travel to Castres next Saturday.
But the Irish province are already certain to win the pool as they scored more match points in the head-to-head games between them and Saints after securing a try bonus point in their win at Franklin's Gardens.
There are two places available in the last eight for the two best runners-up - but with 20 points normally the minimum requirement to secure one of them, even a four-try bonus point win away to Glasgow may not be enough for the 2011 beaten finalists.
Second row Courtney Lawes put in an eye-catching performance to gladden the watching England coaches and as the game wore on the Saints pack became increasingly dominant in the scrum and around the park.
But in the end too many mistakes and the sheer obduracy of the visitors meant a narrow victory was all Saints could chisel out.
South African scrum-half Kockott landed a penalty to give Castres the lead but Myler knocked over two for Saints as the hosts, initially shaky in the scrum, saw their front row begin to get to grips with their opposite numbers.
Leading 6-3 after half an hour a four-try bonus point victory looked a long way away and Castres were soon level after Dylan Hartley was penalised at a ruck in front of the Northampton posts and Kockott slotted a simple kick.
The visitors had Georgian prop Anton Peikrishvili yellow carded for dragging down a maul shortly before the break but the French side repelled Saints' attempts to drive over from an attacking line-out.
Daniel Kirkpatrick hit the woodwork with a drop-goal for Castres just after the interval but Saints finally exploded into life with a sweeping move that ended with Hartley held up over the line.
From the scrum Phil Dowson was bundled into touch in the corner but Saints stole the Castres line-out and sustained pressure ended with Myler popping over a penalty.
Saints by now were well on top in terms of both territory and possession and they moved into a six-point lead as replacement Lamb kicked a penalty after another Northampton assault.
A brace of penalties apiece from Kockott and Lamb ensured the final margin was six points and left Saints knowing their Heineken Cup hopes are hanging by a thread.
VIEW FROM THE DRESSING ROOM
Northampton director of rugby Jim Mallinder told BBC Radio Northampton:
"We've lost too many games at home and come away disappointed so we'd talked about getting the performance and the win.
"We'd have really liked to have got five points but Castres never gave up and, defensively, they were very good.
"I've got two two or three (times) in my mind where we should've done better close to the try line. But you're against a quality side.
"The possibility is for the second place (to qualify in the Heineken Cup) but you've got to go to Glasgow and win and then we'll see what competition we're in."
Northampton captain Dylan Hartley:
"It shows we have a good character [to still be in the competition]."
"Tonight was a good all-round performance. We wanted to score four tries and take five points but they are a good team and to close out a game as close as that was quite professional.
"Going into next week, we have to get five points to keep hopes alive. We are doing all right away from home. The spirit is good in the camp.
"All we can do is worry about winning and hopefully the tries will come with that."
Northampton: Foden; Wilson, G Pisi, Waldouck, Elliott; Myler, Dickson; Tonga'uiha, Hartley, Doran-Jones, Manoa, Lawes, Clark, Wood, Dowson.
Replacements: May for Waldouck (62), Lamb for Myler (56), Roberts for Dickson (62), A. Waller for Tonga'uiha (65), Mercey for Doran-Jones (56), van Velze for Dowson (56), Sorenson for Van Velze (75).
Not Used: Haywood.
Castres: Dulin; Evans, Cabannes, Lamerat, Garvey; Kirkpatrick, Kockott; Taumoepeau, Bonello, Peikrishvili, Samson, Tekori, Bornman, Caballero, Classen.
Replacements: Sanchou for Cabannes (71), Bonnefond for Lamerat (66), Bernard for Kirkpatrick (73), Marmotion for Taumoepeau (62), Mach for Bonello (52), Rolland for Samson (71), Wannenburg for Classen (65).
Not Used: Forestier.
Sin Bin: Peikrishvili (35).
Ref: George Clancey (RFU).