An attempt by a faction of the Tarrant County Republican party in Texas to oust its vice-chairman because he is a Muslim failed in an emotional party vote Thursday night.

Shahid Shafi, a trauma surgeon and city council member, was backed in a 139-49 vote after more than two hours of closed door discussions. Cheers could be heard outside as the results were read.

As the meeting gathered Thursday night, one of his chief critics, Sara Legvold, former member of the Texas State Republican Executive Committee, stood outside dressed in a the lobby wearing a black burqa to underscore her opposition to Shafi's appointment.

“You already see it in the workplace where Muslims demand they’re able to wear their hijab and demand they get a prayer room,” she said, according to the Texas Tribune. “When was the last time a Christian was allowed to have a separate place to say their prayers?"

Shafi, a Muslim who was born in India and raised in Pakistan, studied medicine in the United States and became a naturalized citizen in 2009.

After the vote, Shafi said the campaign to oust him had been hard on him and his family, but that he felt no animosity toward his critics, the Star-Telegram reports.

"As an immigrant to this great country, I am honored and privileged to receive the support of my fellow Republicans," he told reporters. "We need to learn to trust each other so we can create a more perfect union everyday."

Darl Easton, the county chairman who originally appointed Shafi, said in a written statement that the vote reaffirmed the commitment by most Tarrant County Republicans "to our core values and moral compass, a demonstration of our allegiance to the Texas Republican Party Platform and the Constitutions of the United States and Texas, which strictly prohibit religious and racial discrimination of any kind."

“Religious liberty won tonight and while that makes a great day for the Republican Party of Tarrant County, that victory also serves notice that we have much work to do unifying our party,” he said.

Shafi had won the support of Texas state Republicans including Gov. Greg Abbott, Sen.Ted Cruz and Land Commissioner George P. Bush.

"Religious freedom is at the core of who we are as a nation and state," Abbott said in a statement this week, "and attacks on Dr. (Shahid) Shafi because of his faith are contrary to this guiding principle."

The Texas GOP executive committee has also rallied to Shafi's cause, passing a non-discrimination resolution that affirms and supports “all Americans’ right to practice their religion … and recognizes the contributions of Republicans of every faith who advance conservative policies and ideals.”

The bid to oust Sharif was led by Dorrie O'Brien, precinct chairman in Grand Prairie, who said the issue is not religion, but whether Shafi supports Sharia law and is linked to "Islamic terror groups."

“We don’t think he’s suitable as a practicing Muslim to be vice chair because he’d be the representative for ALL Republicans in Tarrant County, and not ALL Republicans in Tarrant County think Islam is safe or acceptable," O'Brien wrote on Facebook.

Sharia is not a state-based set of laws, rather it is a body of Koran-based guidance that directs Muslims toward living an Islamic life.