Veteran middleweight Tim Kennedy is hanging up his gloves for good.

The UFC 185-pound contender and former Strikeforce title challenger today announced his retirement in a lengthy Facebook post.

Kennedy (18-6 MMA, 3-2 UFC), who’s No. 15 in the USA TODAY Sports/MMAjunkie MMA middleweight rankings (and No. 11 in the UFC.com rankings), wrote that he’s considered retirement in the past couple years. However, after his recent return from a two-year layoff and a TKO loss to Kelvin Gastelum, the 37-year-old decided the time was right.

He wrote that the people close to him tried to talk him out of it and suggested he was still one of the division’s best.

“I appreciated their comments, and I don’t think they are wrong,” he wrote. “I know I am still a good fighter. I know I was away a while. But they didn’t feel what I felt, and that’s being 37.”

Kennedy, turned pro in 2001 and balanced his fighting life with his military career. The Army Ranger and Green Beret sniper made special mention of his military family, as well as the opportunity to headline “UFC Fight Night 31: Fight for the Troops 3.” Kennedy knocked out Rafael Natal at the 2013 event, which took place at Fort Campbell in Kentucky for active military personnel. It was part of Kennedy’s 3-0 start to his UFC career after a four-year run with Strikeforce, as well as stints with the IFL and WEC.

“I want to thank the military community for their support,” wrote Kennedy, who’s recently been an outspoken proponent of an MMA fighters association (he discusses it in the video above). “I’ll never be able to explain how much you motivated me and how much I always tried to make you proud. I’ve been a professional fighter for two decades, but there was no greater moment for me than winning the main event of Fight for the Troops 3. You made me invincible that night. I will keep fighting for you all until the day I die.”

Kennedy went 6-1 from 2011-2014 and had moved into UFC title contention. However, he concludes his career with back-to-back knockout losses to Yoel Romero (in a controversy-filled bout) and Gastelum.

Kennedy owns wins over current middleweight champion Michael Bisping, ex-titleholder Robbie Lawler and veteran slugger Melvin Manhoef, among others.

Although his fighting days are done, Kennedy said he plans to remain involved in MMA and push for fighters’ rights.

“So with that, to all of you fighters out there, I am not going anywhere,” he wrote. “I love fighting and will always have the heart of a (fighter). I am committed to growing our sport and taking care of those who are a part of it.”

Here’s the full text of Kennedy’s retirement announcement:

Sitting in the ER at Saint Michael’s hospital in Toronto, Canada after my fight, I looked up at my buddy Nick… Posted by Tim Kennedy on Tuesday, January 17, 2017

Sitting in the ER at Saint Michael’s hospital in Toronto, Canada after my fight, I looked up at my buddy Nick Palmisciano who had ridden in the ambulance with me. This wasn’t our first time in this situation. I’d been here a few times in our past decade together. Sometimes for wins and sometimes for losses. The end result always looked the same: Nick carrying five bags that should have been split among three corners and me and my face are bleeding and swollen. “That’s it man,” I said. “We’re all done.”

We had talked about it a lot over the past few years. I’d spoken to Nick, to my wife Ginger, and to Greg Jackson and Brandon Gibson ad nauseam about the coming end. No matter how hard I trained, I knew this ride wouldn’t last forever. But saying it out loud definitely brought me both sadness that this chapter was complete and overwhelming relief that it’s a decision I could make without worrying about taking care of my family.

I had just lost to Kelvin Gastelum, a really respectful and hard-working young fighter who went out and did all the things I consider myself good at, but did them better. He actually reminded me of me when I was younger, except I was kind of a jerk back then. As losses go, I was kind of happy I lost to a guy like him.

A lot of my coaches, friends and fans immediately tried to build me up again. “Kelvin has the right skillset to beat you and it was your first fight back.” “You had ring rust.” “You’re still a top 10 middleweight.” I appreciated their comments and I don’t think they are wrong. I know I am still a good fighter. I know I was away a while. But they didn’t feel what I felt, and that’s being 37. I felt like I was in slow motion the entire match. I felt tired for the first time ever in a fight. I’m the guy that once graduated Ranger School – a place that starves you and denies you sleep for over two months – and took a fight six days later in the IFL and won. I’m the guy that is always in shape. And I was for this fight. I worked harder than I ever have before for this fight. But I wasn’t me anymore. My brain knew what to do but my body did not respond. I’ve watched other fighters arrive here. I’ve watched other fighters pretend they weren’t here. I will not be one of them.

I want to thank the military community for their support. I’ll never be able to explain how much you motivated me and how much I always tried to make you proud. I’ve been a professional fighter for two decades, but there was no greater moment for me than winning the main event of Fight for the Troops 3. You made me invincible that night. I will keep fighting for you all until the day I die.

I want to thank all of my coaches, from the old Days working with John Hackleman and Chuck Liddell, to all my military buddies who trained with me while I was on active duty, to Greg Jackson, Mike Winkeljohn, and Brandon Gibson now. That you all thought me worthy of the investment of your time means more than you will ever know.

I want to thank all of my opponents. Iron sharpens iron and every great victory or crushing defeat occurred because there was someone who trained hard and had the courage to meet me across the cage. I want to call a few guys out in particular. To Luke Rockhold and Jacare: you guys gave me two grinding fights that asked for everything I had. You both made me better and I hope I did the same for you. I hope the two of you keep that Strikeforce chip on your shoulders and get back on top. To Robbie Lawler: you hit me harder than anyone ever has. Seriously, that really hurt. To Roger Gracie: My training for your fight reminded me that I love the gi. Thank you for that. To Rafael Natal: It took tremendous guts to take the Fight for the Troops fight. I will always appreciate you for that and cheer for you every time you fight. To Michael Bisping: I’ve never wanted to beat anyone more than I wanted to beat you, and that motivated me to provide the best version of myself. Best of luck to you going forward, Champ.

Finally to my wife: I don’t deserve you and you don’t deserve what I’ve put you through. I could lie to you and tell you it’s all over, but we both know I have already moved onto another super dangerous thing to fill my time, so I’m going to leave it just at “thank you and sorry” for now.

So with that, to all of you fighters out there, I am not going anywhere. I love fighting and will always have the heart of a figher. I am committed to growing our sport and taking care of those who are a part of it. As sad as it is for me to walk away, the only thing sadder would be for me to stay because I had no other choice in order to feed my family. Someday the Kelvin Gastelum’s and the Yair Rodriguez’s and the Paige VanZant’s will be sitting in their respective emergency rooms with their respective Nick’s talking about it being over. And when that day comes, I want to make sure their future is secure.

I love you all. Thanks for listening. And thank you most of all for giving me the opportunity to do what I love for all these years.

For more on the UFC’s upcoming schedule, check out the UFC Rumors section of the site.