When backed into a corner, Donald Trump acts like a pig.

After floundering on the biggest debate stage of his short political career, the former reality television star devoted a week to discussing the weight of Miss Universe winner Alicia Machado, even garishly imploring people to hunt down a nonexistent sex tape.

When Marco Rubio managed to briefly get under his skin during Trump’s march to the nomination, the real estate mogul reverted to discussing the size of his penis during a debate.

And shortly after marrying his wife in 2005, he was caught on tape disgustingly joking about sexual assault.

Another particularly vulgar example of Trump’s boorish behavior came in 2012 when he offered to show attorney Gloria Allred his manhood—and then questioned the gender identity of the lawyer who famously crusades on behalf of her female clients.

The uncouth remarks came about as a result of a spat over another Miss Universe pageant. A trans contestant, Jenna Talackova, was initially barred from competing in the Miss Universe Canada event due to pageant rules stipulating that the contestants needed to be “naturally born” women. She enlisted the help of Allred to challenge the rule, and Trump, who owned Miss Universe at the time. Trump relented and allowed her to compete but not before engaging in quite a lurid exchange of words about Allred and the client she represented.

It’s one of any number of instances in which Trump has shown off sexist behavior, including a recently unearthed case in which he threatened to fire female employees of a California golf club if they weren’t attractive enough.

“This is really about exclusion from a business opportunity,” Allred told The Daily Beast as she reflecting on the Talackova incident. She said she couldn’t recall whether or not Trump had made sexist remarks at the time to other contestants.

During a press conference in April, 2012 as Allred laid out Talackova’s case, she snarkily tried to expose the double standard at work.

“She did not ask Mr. Trump to prove that he is a naturally born man,” Allred said of her client as cameras snapped. “Or to see the photos of his birth, to view his anatomy to prove that he was male. It made no difference to her. Why should it have made a difference to him?”

Trump, forever incapable of turning away from obvious bait, hit back in a nasty call with TMZ.

Before even being asked a question, Trump said: “I think Gloria would be very very impressed with me, I really do,” referring to his penis with the subtlety of a train crashing through a building.

“I think she’d have a whole brand new image of Donald Trump,” he continued through the laughter of the TMZ staff. He went on to say that Talackova could compete if she chose to do so but joked that he might have changed his mind if he knew that Allred was involved.

But when asked if he would apologize for the incident, Trump answered: of course not.

“If she competes that’s wonderful and if she doesn’t want to compete because maybe she thinks she can’t win, that’s fine also,” Trump said. “I couldn’t care less.”

Like he does in most of his grudge matches—think about his years-long fight with Rosie O’Donnell— Trump extended this battle even after allowing Talackova to compete in the pageant.

In a televised interview with Barbara Walters, Trump presented a conspiracy theory about the contestant’s name. He wrote out the letters J-E-N-N-A-T-A-L on a white piece of paper, suggestively implying that name was some kind of indicator of Talackova’s gender.

“I looked at her name and somebody brought this up to me: ‘Jennatal,’ those are the first letters of her name,” Trump said. “It’s Jennatal,” he said displaying the card like a first-grader proud of a finger-painting. “And I’m saying to myself ‘hmmm that’s strange. Could there be an ulterior motive?”’

In the same episode of “20/20,” Allred retorted: “With all due respect to Mr. Trump, he really needs to stop being focused on genitals. His or anyone else’s. This world does not revolve around his penis or anyone else’s genitalia.”

A more disciplined person might have ended this remarkably stupid discussion right there, but Trump continued the dialogue in a series of tweets.

Using the service TwitLonger, which allows one to tweet more than 140 characters, Trump went on to reiterate his brilliant theory about Talackova’s name.

“Jenna changed her name from Walter to Page and then to Jenna so that now her name is Jenna Talackova,” he tweeted. “If you take the first 3 letters from Talackova and add them to Jenna, it’s Jennatal (genital?). Is there something a little strange going on here? In any event, I have given the okay for her to compete in the Miss Universe Canada Pageant. It will be a wild evening with ticket sales through the roof—lots of interest!”

A spokesperson for Talackova did not respond to a request for an interview.

But Trump wasn’t done there. He also openly speculated about Allred’s gender.

“I made my decision to allow Jenna Talackova to participate in Miss Universe Canada two days before Gloria Allred got involved,” he tweeted on April 9, 2012. “I hope Jenna is not paying Gloria a fee other than all the free publicity that Gloria is getting for no reason. Gloria actually hurts Jenna—— I do nothing for Gloria, who in my opinion is a third rate lawyer. Is Gloria a man or a woman????—— few men would know the answer to that one.”

Allred was dismissive of Trump’s personal attacks on her.

“I had strong things to say about [his remarks] in my news conference. That was his reaction,” Allred said. “Maybe he wasn’t used to being confronted by a strong woman. I was not a politician tiptoeing around what I had to say. My guess is that upset him to be confronted in that way.”

And funnily enough, Allred said she had another encounter with Trump years later in the green room of Fox News in New York. It went a bit differently than she had thought going in.

“He was in the building and I thought ‘Oh my goodness, I wonder if he’s going to come back here after his appearance,’ Allred said. “So he went off the air, he comes running back into the green room. And he said something to the effect of “I heard Gloria, you’re here.”

“I introduced him to the client and he said to her while I’m standing there with her: ‘I just want you to know Ms. you have the best person you could ever have. Gloria is absolutely relentless, she will fight to death for you. She will never never give up. So never ever fire her because you will never get anyone better.’ I said ‘well thank you very much’ and then he left and that’s the last time I ever saw Donald Trump.”