TOWARD the end of last month’s Golden Globes ceremony, the producer of the nominated drama Moonlight made a surprise onstage appearance: Brad Pitt.

Before he could begin his remarks, the crowd burst into loud, sustained applause. More than a few of his peers gave him a standing ovation. He looked trim, tanned, better than he had in years, and even he seemed taken aback by the level of support expressed that night.

No matter how the Brad Pitt-Angelina Jolie divorce shakes out, one thing’s clear: Pitt wins custody of Hollywood.

It wasn’t supposed to be this way, at least according to Jolie’s post-split strategy. Hours after she blindsided Pitt with her divorce filing last September, rapid-fire leaks full of intimate, sordid details surfaced on TMZ: Jolie filed for divorce “for the health of the family.”

She had the FBI and the Los Angeles County Department of Children and Family Services investigate Pitt — whom she had publicly, profusely said was a wonderful father — on charges of child abuse.

Jolie filed for sole custody of their six children while reports somehow surfaced that Pitt had a terrible temper and issues with drugs and alcohol. Then came word that Pitt would be allowed only limited, supervised visits with those children who even wanted to see him.

It was a remarkable data dump for a couple who had spent 12 years together on lockdown, preserving their ostensibly perfect Brangelina brand: the most glamorous, enviable couple in Hollywood since Liz and Dick.

Within days, Pitt went into hiding. Save for one pointed court filing in ­December, in which his team stated that Jolie was placing “her own interests above those of the minor children” and “apparently has no self-regulating mechanism to preclude sensitive information from being placed in the public record,” Pitt remained ­silent.

Clearly, Jolie must have believed she was winning public opinion. After all, she was the rare megastar without a publicist, and she had masterfully reinvented herself multiple times: She had gone from wanton, drug-using, incest-teasing, vial-of-blood-wearing starlet to valiant single mom to selfless humanitarian to devoted, domesticated wife. She wrote and directed movies, travelled to refugee camps, worked for the UN, was made an honorary dame by the Queen of England. Her soon-to-be ex-husband was in retreat.

What couldn’t Angelina Jolie do?

After Pitt’s triumphant appearance at the Globes, Jolie apparently realised there was, in fact, one thing even she couldn’t do: Make people in Hollywood hate Brad Pitt.

The subtext was even worse: they tolerated her only because of him.

Less than 24 hours after Pitt’s re-emergence, she issued a joint statement with him that read, in part, that they were “committed to act as a united front” and that they were hiring a private judge to keep everything confidential.

Most interestingly, Page Six reported last week that Jolie had begun reaching out to top Hollywood publicists for help in rehabbing her image.

So far, no one’s interested.

Jolie’s isolation from her peers and the show-business community at large has often been attributed to her controversial manager, Geyer Kosinski. His reputation in Hollywood is toxic: In 2010, Deadline reported that he was “known to be very controlling, very secretive, very involved with his clients’ lives.” He’s also known as “Geyer the Liar,” and in 2013 Jolie fired him after he bungled the deal that would have had her star in Gravity, the outer-space thriller that won seven Oscars and a Best Actress nomination for Sandra Bullock.

Yet just after Jolie filed for divorce, Kosinski was back in her inner circle, advising her and giving statements to the media on her behalf.

“Angelina will always do what’s in the best interest of taking care of her family,” Kosinski told E! News at the time.

It was a line that few were buying.

On Saturday, Jolie made her first public appearance since the divorce announcement, and it seems she and Kosinski have gone back to her old playbook: trot out the kids, head to a Third World country, mingle with royalty and refugees, and promote her latest film while pretending to be above such crass commercialism.

While premiering First They Killed My Father, the film she directed about the Cambodia genocide, Jolie met with the nation’s king at his palace, all six children in tow for the photo op. Then she took them to a press conference where she sat on a dais with Cambodian refugees before screening the film in an ancient Angkor Wat temple. People magazine reported that while Jolie was holding court, locals picnicked on a nearby river while monkeys foraged around them for food.

She told the press that her eldest son, Maddox, whom she adopted from Cambodia when he was 7 months old, was the animating force behind the film.

“He was the one who just called it and said he was ready and that he wanted to work on it, which he did,” Jolie told The Guardian. “He read the script and helped with notes and was in the production meetings.”

Maddox, who does not ­attend school, has just two film credits — one as a zombie in Pitt’s World War Z and the other as a “trainee” on Jolie’s By the Sea. He is 15 years old.

Even before the split, it seems Jolie wasn’t well respected or liked in the industry.

She had a reputation for stealing other actresses’ boyfriends: Jolie married Billy Bob Thornton in May 2000 while his girlfriend, Laura Dern, was out of town. “I left our home to go make a movie, and while I was away my boyfriend got married,” Dern later said. “I never heard from him again.”

And, of course, there was Pitt, who was married to Jennifer Aniston when Jolie came along. After news of the Brangelina divorce broke, it was reported that Aniston and her friends called Jolie “The Groom Raider.” Jolie herself admitted that despite her wealth and fame, she had no real friends.

“I’ll talk to my family,” she told Marie Claire in 2011. “I talk to Brad ... But I don’t know, I don’t have a lot of friends I talk to. He really is the only person I talk to.”

One year later, Jolie and Pitt appeared at the Oscars, and she became an internet meme after posing ridiculously with her right leg jutting out of her billowing black Versace gown. “Angelina Jolie looked like a fool the way she posed,” Joan Rivers said at the time. “She took herself right out of that superstar category because you now realise she stands in front of a mirror to figure out [what she looks like].”

The 2014 Sony hack revealed that behind-the-scenes powerbrokers didn’t think much of Jolie either. E-mails between super-producer Scott Rudin and then-studio head Amy Pascal showed lots of sniping about Jolie, who wanted to star in a remake of Cleopatra.

Jolie, Rudin wrote, was a “minimally talented spoiled brat” and “a camp event” less interested in high-end filmmaking than taking “a $180m ego bath.”

When ­Jolie said she was still “studying a few more films” to decide whether the great Ridley Scott was a suitable director, Rudin wrote: “Beyond belief. She’s studying films. Kill me please. Immediately.” He also wrote that he couldn’t deal with her “insanity and rampaging spoiled ego” and eventually walked away from the project.

Pascal, meanwhile, criticised Jolie’s directorial adaptation of Unbroken after it bombed at a preview screening. “[D]oesn’t sound like Academy [Awards] to me,” Pascal wrote — and this was the film Jolie had hoped would establish her as an A-list director. Instead, it opened to poor reviews and received no Oscar nominations.

At a roundtable discussion for The Hollywood Reporter later that year, Jolie sat among such respected directors as Christopher Nolan, Richard Linklater and Bennett Miller, and as she nattered on about her novice career and motherhood, director Mike Leigh widened his eyes and tugged on his hair in exasperation. After she gave a winding answer about life’s challenges, Leigh jumped in: “Apart from all that,” he asked Jolie, “are you a good director?”

“I don’t know,” she said.

Judging by her most recent theatrical release, probably not. By the Sea, which she wrote, directed and co-starred in with Pitt, was a frontrunner for the 2015 Razzies and made just $531,000 on a $10 million budget.

Pitt, meanwhile, just signed a $60 million deal with Netflix for his forthcoming film War Machine. His respected company, Plan B, produces both Oscar bait and crowd-pleasers — from The Departed to The Big Short to 12 Years a Slave and this year’s critical favourite Moonlight.

Before their split, Jolie was set to direct Pitt in ­Africa, a would-be epic about the life of conservationist Richard Leakey.

That project is no longer happening. It seems Jolie has begun to realise that so much of her star power and goodwill was on loan from Pitt. Without it, her future in Hollywood is uncertain at best, and the damage she has done to her highly crafted image may be irreparable. As high-powered divorce lawyer Raoul Felder told The Post last week, “Hiring a P.R. person now is like going for a check-up after you’ve already had the heart attack.”

This story originally appeared in the NY Post and is republished here with permission.