He went on to make 152 appearances for his native province and was part of the team that won the European Cup at Lansdowne Road back in 1999.
Despite making his international debut relatively late in his career, aged 29, he won 26 caps for Ireland. He played his final game in May 2005, representing the Barbarians against Scotland.
Following his retirement from playing, he took up a post as manager of the Ulster Rugby Academy.
In that role he had the opportunity to work with young talent from across the province and was part of the team that mentored players such as Tommy Seymour, Iain Henderson, Paddy Jackson, Craig Gilroy, Luke Marshall, Paul Marshall, Chris Henry, Darren Cave, Stuart Olding and Ian Whitten, all of whom have been capped at international level.
He leaves Ulster Rugby to take up a position at the Sports Institute of Northern Ireland and will use his Masters degree in sports psychology to provide psychological and lifestyle support to athletes and coaches in the region.
Commenting on his new role, Longwell said: "It is a great challenge and one that I am looking forward to. I had a tremendous 22 years at Ravenhill and I leave with extremely fond memories.
"Winning the European Cup was a fantastic experience, as was drawing with Toulouse in France the following year. I was also fortunate as a coach to see many young players develop into world-class athletes - that was extremely pleasing.
"I am looking forward to taking the experience that I gained at Ulster, both as a player and as a coach, into my new role at SINI."
Ulster's director of rugby David Humphreys added: "Gary Longwell has been a remarkable servant to Ulster Rugby. As a player he bridged both the amateur and professional era and is rightly considered one of the best second rows to have ever pulled on an Ulster shirt.
"As a coach he has been a central part of the success of our Academy and he was instrumental in developing the careers of dozens of young rugby players. I have no doubt that he will be hugely successful in his new role and I want to wish him all the best."