Fourth placed Swansea University avenged their 45-15 defeat in November to second-placed Hartpury by securing victory at St Helens.
Captain Richard Smart was pleased with the win and admitted it was the “only option.”
He said: “We needed to get the winning momentum going.
“It’s always a great feeling to get a win against someone who beat you previously.”
Swansea started brightly capitalising on Hartpury’s poor discipline.
Fly-half Aled Lewis converted two penalties in the first 11 minutes.
The second coming from inside Swansea’s own half.
The opening try of the game came after 27 minutes when Jackson Szabo scored.
The winger finished off a sweeping move involving the back line and evading two tackles to cross over the line in the left corner.
Lewis missed his conversion and moments later attempted a drop-goal from 45m which drifted right of the posts.
Four minutes before the break, Hartpury’s Sam Harrsion hit back with a try of his own for Hartpury.
He received the ball from the ruck and breached the Swansea defence to go over unchallenged for an uncoverted try.
With Swansea leading 11-5, they looked to increase their lead with an early break in the second half.
Wing Tom Bonnell was set free by outside centre Elliot Jones but Hartpury’s Graeme Lawler dived in to make try-saving tackle.
And it spurred the visitors on as in the 56th minute fly-half Jack Debreczeni barged his way through the Swansea back line to score their second try of the game and keep their championship dreams alive.
But Swansea were boosted soon after when when Hartpury’s No 8 Brandon Walker was sin-binned for a culmination of offences which reduced the travelling side down to 14.
The consequent penalty conceded by Walker was converted by Lewis leaving the home side with a 14-10 lead at the hour mark.
Then, with eight minutes left, Swansea upped the tempo and prop Chris Francis crossed under the posts to score for Swansea and confirm the victory.
Replacement fly-half Ianto Griffiths adding the extras.
“We showed a lot of promise in attack which is always good, we are looking more threatening,” said Smart.
“There is still work to be done but overall I am very pleased with the win.”
Swansea will now try to finish the season in the highest possible position.
Hopes of third remain a possibility.