It’s hard to bargain with shame. That’s something Mark Wahlberg learned following a storm of outrage when it was revealed that the actor received 1,500 times the salary of his female co-star, Michelle Williams, for reshoots on the Ridley Scott drama All the Money in the World.

On Saturday, Wahlberg announced that he would be donating the $1.5 million he earned for the reshoots in Williams’ name to the Time’s Up legal defense fund for victims of sexual abuse and harassment. WME, the agency that Wahlberg and Williams share—and was criticized for being complicit in the pay inequity for not advocating for Williams—will also donate $500,000 to Time’s Up in Williams’ name.

“Over the last few days my reshoot fee for All The Money in the World has become an important topic of conversation. I 100% support the fight for fair pay and I’m donating the $1.5 million to the Time’s Up Legal Defense Fund in Michelle Williams’ name,” Wahlberg said in a statement.

The gesture could largely be seen as reaction to pressure, with Wahlberg and WME lambasted for the way salary negotiations were handled for last-minute reshoots for the J. Paul Getty thriller. The film had formerly co-starred Kevin Spacey as Getty. After allegations of sexual misconduct surfaced with less than two months before the film’s scheduled awards-qualifying release date, Scott recast the role with actor Christopher Plummer and requested that Williams and Wahlberg participate in reshoots of all of Spacey’s scenes.

Williams offered to participate in the reshoots for free, saying, “I said I’d be wherever they needed me, whenever they needed me. And they could have my salary, they could have my holiday, whatever they wanted. Because I appreciated so much that they were making this massive effort.”

“ Of course, it would not have happened if this pay gap had not become public information and the outrage not spread as quickly and at such a volume as it did. ”

In the end, she was paid a per diem of $80 per day, totaling just under $1,000. It was considered a noble gesture to ensure one man’s bad actions not sully the efforts of the entire production.

Wahlberg, however, used the reshoots as leverage to negotiate a massive $1.5 million payday. More, it was reported that Wahlberg’s contract stipulated co-star approval, and that he would not sign off on Plummer’s casting unless he was paid the hefty sum.

That his behavior would be considered callous—profiting off of the fallout from Spacey’s sexual misconduct—is one thing. But that it also exemplified the financial power male actors in Hollywood possess in comparison to their female counterparts, and the industry’s shrugging acceptance of gender pay inequity as the norm, is another.

Throughout the controversy—Williams is unequivocally the film’s lead and has been award-nominated for her performance, yet was paid .06 percent of what Wahlberg earned—has been the issue of negotiation.

We wrote at length about Williams’ worth compared to Wahlberg’s perceived worth. Since then, some argued (quite tone-deafly) that the actress and her team are to blame for not negotiating with the same vigor that Wahlberg and his team were in their right to do. But inextricably tied to that icky argument is the fact that the actors share an agency, and that agency didn’t see it necessary to protect Williams, advocate for her equal pay, or even see it inappropriate that there was such gross salary inequity between their clients.

Along with its announcement that they would be donating $500,000 in Williams’ name to Time’s Up, WME said in a statement: “The current conversation is a reminder that those of us in a position of influence have a responsibility to challenge inequities, including the gender wage gap. In recognition of the pay discrepancy on All The Money In The World reshoots, WME is donating an additional $500,000 to the Time’s Up Legal Defense Fund in Michelle Williams’ name, following our $1 million pledge to the organization earlier this month. It’s crucial that this conversation continues within our community and we are committed to being part of the solution.”

This is the best possible outcome for a horrendous situation. But, of course, it would not have happened if this pay gap had not become public information and the outrage not spread as quickly and at such a volume as it did.

As BuzzFeed’s Kate Aurthur pointed out on Twitter in response to the news of Wahlberg’s donation, “We have seen in the past few months that shame works wonders, perhaps more than anything else!” The test now will be to see the impact of this story going forward when negotiations are happening behind closed doors, salary quotes aren’t made public, and there is no shame to guide the purse strings.