|Specsavers County Championship Division Two, The SSE Swalec, day four|
|Glamorgan 252 & 263: Donald 59; Magoffin 3-50|
|Sussex 283 & 236-8: Nash 64, Brown 42*; Van der Gugten 5-73|
|Sussex (21 pts) beat Glamorgan (5 pts) by two wickets|
Sussex scraped home by two wickets in a thrilling game against Glamorgan after being set 233 to win at Cardiff.
It was left to Ben Brown (42 not out) and the lower order to steer them home after Glamorgan paceman Timm van der Gugten claimed five wickets.
Brown and Danny Briggs (36) shared a vital stand of 55 for the eighth wicket, while Chris Nash made 64.
Sussex remain unbeaten in Division Two with three wins and nine draws, leaving them fourth in the table.
Earlier, Glamorgan's second innings fell away badly to 263 all out, with only Aneurin Donald (59) making a major contribution on the final day.
Steve Magoffin's 3-50 in 23 overs was the key contribution as the home side lost their way with the bat.
Nash and Luke Wells (33) added 87 for Sussex's third wicket to put them in the driving seat, before Van der Gugten ripped out the middle order as the game continued to swing one way and the other.
Brown and Briggs turned it back in the visitors' favour, and number 10 George Garton (18 not out) struck the winning runs with 20 balls in hand.
Meanwhile Sussex will be without paceman Jofra Archer for the next game against Kent on Wednesday 31 August because of a family bereavement in Barbados.
Glamorgan will assess Craig Meschede's back strain for their trip to Northampton.
Glamorgan captain Jacques Rudolph told BBC Wales Sport:
"Proud is the first word that comes to mind, I thought the way we fought there for two sessions was unbelievable but potentially one hour in the game with our batting cost us, there were some dismissals that were soft.
"Timm has definitely got X-factor, we've known that from the start of the season, and he's a quick bowler who bowls long spells as well.
"The second division is different to the first because there's no relegation so we don't have a lot to lose and I'm happy with the way we fought all the way through, unfortunately we were just on the wrong side."
Sussex coach Mark Davis told BBC Sussex:
"It was a rollercoaster game, great to get a result after we were dealt a lesson here (in Cardiff) in white-ball cricket so nice to win a red-ball game.
"The pitch greened up under the covers and we felt if we got it right with the ball, we had a chance of bowling them out and it was an amazing game of cricket.
"Nashy (Chris Nash) again played outstandingly well, it was probably the best I've ever seen him bat in the first innings against an attack that's possibly the best we've played in the league, van der Gugten looks a very good bowler.
"Then Browny (Ben Brown) to win it and Briggsy (Danny Briggs) to put on the partnership, it was special."