It pays to have friends in high places.

Al Sharpton gave himself a 71 percent raise last year after his National Action Network group drew a record $6.9 million in donations — as the controversial cleric’s association with Mayor de Blasio and President Obama lent him a newfound air of legitimacy.

De Blasio’s election gave Sharpton a seat at City Hall, as the mayor treated him as an adviser and presented him at a press event next to Police Commissioner Bill Bratton after the death of Eric Garner.

Also in 2014, Obama addressed NAN’s annual convention, bringing along five of his Cabinet members.

The Harlem-based nonprofit collected $2 million more in 2014 than the year before, according to the latest financial records available.

Sharpton’s pay increased from $241,545 in 2013 to $412,644, including a bonus of $64,400, tax filings obtained by The Post show.

In April, four months after his pal de Blasio took office, some 5,000 people attended NAN’s 2014 conference headlined by Obama and attended by the mayor, Gov. Cuomo and then-US Attorney General Eric Holder. It was NAN’s biggest fund-raiser of the year.

In October, a few months after Sharpton’s summer of police protests, he pulled in a reported $1 million at his 60th-birthday bash. Pols and dignitaries rushed from the annual Al Smith Dinner hosted by Timothy Cardinal Dolan that same night to the NAN fund-raiser at the Four Seasons restaurant.

NAN does not need to disclose its donors, but a program distributed at his birthday parties had full-page ads from companies that gave money. AT&T, real-estate developer Forest City Ratner, Walmart, McDonald’s, Verizon and GE Asset Management were all included.

Although Sony’s then-co-chairwoman, Amy Pascal, met with Sharpton in 2014 after a hacker revealed racially insensitive e-mails, the reverend told The Post that Sony did not give NAN money.

The windfall allowed the organization to finish 2014 in the black. Yet NAN, and Sharpton, continued their deadbeat ways.

NAN didn’t pony up its last installment on the $780,145 it owed the IRS for unpaid payroll taxes until this Oct. 22, the organization’s financial statements show. The nonprofit had racked up unpaid payroll taxes since at least 2003, according to public records.

Sharpton, meanwhile, still has outstanding tax liens of $3.4 million, including money he owes personally to both New York state and the IRS, and taxes owed by his businesses, according to public records. He paid off one federal lien, for $931,398, in April.

Sharpton has maintained that he owes much less money than records reflect and that he has been chipping away at the bills through payment plans.

He also insists he didn’t really get a raise last year.

“I’m glad that NAN has resolved all of our past tax debts three years earlier than our agreement with the IRS and paid part of the compensation owed to me for several years I did not receive a salary,” Sharpton said in a statement.

Tax records show NAN paid him $4,860 in 2006 and nothing in 2007 and 2008.

But a spokesman for the organization offered a different explanation, saying the salary hike was repayment of loans Sharpton previously made to NAN.

Former IRS official Marcus Owens, an expert on nonprofit law, said the explanation seemed odd.

“To structure the payoff of a loan through a salary transfer doesn’t seem really plausible because no one would want to pay income tax on their own money coming back to them,” Owens said. “It seems like that characterization was developed after the fact for some other purpose.”