Doug Beattie is to remain as the Ulster Unionist Party (UUP) leader after he received the support of his party's MLAs and officers.
It followed accusations of misogyny and racism over a number of his historical tweets.
Mr Beattie said the tweets were "pretty horrific" and he was "deeply ashamed" of them.
However, he denied he was a racist or a misogynist. Mr Beattie said the tweets are "not who I am".
On Tuesday afternoon, Mr Beattie said: "I have had detailed conversations with all of my MLAs, I apologised for what I had done directly to each one of them and then I spoke [about] whether or not I still had their support to remain as party leader - overwhelmingly every one of them said 'yes, I did'."
Mr Beattie said that he had also received the backing of the party chairman and its officers and conversations would continue with other UUP members over the historical tweets.
A number of the posts, mostly dating from before the former soldier joined the UUP in 2014, have been shared on social media.
They feature derogatory comments about women and Muslims, the use of a strong racist slur and use of an offensive term for the Traveller community.
Most of the posts being circulated have previously been deleted, but it is not possible to say when that happened.
On Tuesday afternoon, the UUP's deputy leader Robbie Butler confirmed that Mr Beattie had the support of the MLA group and party officers.
In a brief statement at Stormont, he paid tribute to Mr Beattie for "the manner in which he has responded and how serious he takes this issue and these events".
Earlier, Mr Beattie said that if the MLAs or party officers wanted him to stand down, he would.
Doug Beattie has faced his share of battles - on the front lines in Afghanistan, and in turning around the fortunes of the Ulster Unionists at Stormont.
Today came his biggest political fight - managing the backlash over his use of social media.
But he didn't have to wait long to find out his fate, with senior party colleagues publicly cementing support for him this afternoon.
But, privately, there is deep disappointment and hurt over how this controversy surrounding their leader has played out.
The so-called Beattie bounce that had been predicted for the assembly election may also have fallen flat.
Eight months ago, he was the only person in the frame to take over as party leader after Steve Aiken resigned.
Avoiding the optics of a fifth leader in four years may partially explain why Doug Beattie is staying on and not stepping down.
Later, the Upper Bann assembly member told Talkback that he had been "on the cusp" of resigning as leader on Monday.
"I feel quite broken," he said.
Before he gathered support from party members, he told the programme: "So look, I offered my resignation and people said let's look, let's engage - let's engage and see where we go.
"I've never had an easy life so I'll take whatever I have to take.
"I suppose if I believe in what I believe, and I do believe - that Northern Ireland deserves better, but maybe it needs better than me.
"Or maybe it needs me to confront what I did in the past, so that I learn for the future, maybe that's what I need to do."
How did the tweets come to light?
The posts emerged after Mr Beattie apologised for tweeting a joke about former DUP leader Edwin Poots and his wife on Saturday night.
Mr Poots said his wife had been "disgusted" by it and it was widely condemned by Northern Ireland political leaders.
On Tuesday, Donnelly & Wall Solicitors said it had instigated legal proceedings on behalf of Mr and Mrs Poots against Mr Beattie and Simon Hoare, chairman of the Northern Ireland Select Committee, in relation to the tweet.
It is understood Mr Hoare retweeted Mr Beattie's post, before later deleting it.
Patrick Higgins, a partner at the law firm, said the post "constitutes a grave and unwarranted attack on my clients reputation".
On Monday, Mr Beattie issued a personal statement on Twitter in which he said he was "deeply ashamed and embarrassed" by the content of previous tweets.
He did not share details of the tweets, but they later came to be widely circulated on social media.
Mr Beattie, who was an Army officer before he joined the UUP, told the Nolan Show that some of the tweets were sent when he was "still in a male-dominated environment, still in the military".
He described some as having a "dark humour" that was used "as a coping mechanism".
Mr Beattie added: "What I did 10 years ago was absolutely fundamentally wrong then, it's wrong now."
He said he was not hiding away from his "mistakes" and that he was not a misogynist or a racist.
"All I can do is front up to them and make the case that I am deeply sorry and apologise to everybody - the whole of society, certainly to women who may feel let down, to those people who I brought into the party," he said.
"I will absolutely accept that my tweets were misogynistic and I will absolutely stand up to that, but I am not a misogynist."
Support from party members
He added that he also "will not accept" that he is a racist.
As a soldier, Mr Beattie, served three tours of duty in Afghanistan, and was awarded a Military Cross for bravery during operations to retake the town of Garmsir in Helmand, Afghanistan.
He said he had defended Islam and would "completely refute anybody who thinks I have an issue with Islam or with Muslims".
On Tuesday, two Ulster Unionist female politicians tweeted their support for Mr Beattie.
Julie-Anne Corr-Johnston, a former Progressive Unionist Party councillor who joined the UUP last year, said "there is no other leader I trust more with my children's future" than Mr Beattie.
There is no other leader I trust more with my children's future than @BeattieDoug— Julie-Anne Corr-Johnston (@JulieACorr) January 25, 2022
An assembly election candidate for North Down, Naomi McBurney, said she respected her party leader "and what he has delivered and can continue to deliver for Northern Ireland", and had "huge admiration" for "owning the past" on BBC's The Nolan Show.
'Deeply sexist, misogynistic language'
A number of Northern Ireland's political leaders have condemned the tweets.
The DUP's Diane Dodds said the misogynistic language in some of Mr Beattie's tweets did not promote positive attitudes towards women.
"I am troubled that the type of language that is used is deeply worrying for young women and for women in general," she said.
"I have a young daughter, of just over 20 starting out in the workplace, I would not like to think that her leader in the workplace, her boss in the workplace, was using such deeply, deeply sexist, misogynistic language."
Deputy First Minister Michelle O'Neill tweeted on Tuesday that Mr Beattie's comments on "women, race and others are outrageous and totally unacceptable".
"There is a litany of abuse on his account and the public will make up its own mind on that.
"These regressive, outdated attitudes in society must be faced down."
The Green Party leader Clare Bailey described some of Mr Beattie's posts as "deeply disturbing".
"Nobody gets a personality transplant when they take elected office," she said.
"His tweets have really demonstrated deeply disturbing attitudes, not only to women, but to Muslims; to Travellers; there's been slurs about people with mental illness.
"So if this is his union of people, he can certainly count me out."
SDLP Infrastructure Minister Nichola Mallon said they were "deeply, deeply offensive" and she was "shocked and deeply disappointed".
"What I'm so shocked at is it's not just one-off-the-cuff tweet," she added.
"It's the volume and the level. They are deeply offensive and seem to have been relentless during that period, targeting women in particular and a wide range of minority groups."
On Monday, Alliance Party leader and Justice Minister Naomi Long said she was "genuinely shocked at just how casually misogynistic" the tweet referring to Mr Poots' wife was, saying it would "have made many a 1970s comic blush".