Donald Trump’s son-in-law, Jared Kushner, who played a critical behind-the-scenes role in the presidential campaign, will take a similar position in the White House as a senior adviser, it was announced Monday.

“It is an honor to serve our country,” Kushner said in a statement. “I am energized by the shared passion of the president-elect and the American people and I am humbled by the opportunity to join this very talented team.”

Kushner immediately disclosed plans to sell most of his New York holdings, all his foreign holdings, his stake in the family real-estate business and his ownership of the weekly New York Observer.

The Trump transition team also said he would forgo a salary.

Kushner, the husband of Trump’s oldest daughter, Ivanka, was facing a number of questions about conflicts of interest because of his extensive business holdings and a 1967 federal anti-nepotism law that prohibits “public officials” from appointing relatives to agencies they oversee.

“Son-in-law” comes under the designation of “relatives.”

But even David Brock, one of Hillary Clinton’s fiercest defenders, said Kushner — who turns 36 on Tuesday — shouldn’t have a problem.

“While the anti-nepotism law is a murky landscape, Kushner appears to be taking the proper steps regarding the ethics and disclosure requirements for federal employees,” Brock said in an e-mail to The Post.

Mayor de Blasio, who bashes Trump at every opportunity, nevertheless welcomed Kushner’s appointment.

“He’s certainly someone I’ve been talking to over these last weeks. He’s someone I intend to stay in touch with on behalf of the people of New York City. He’s someone who really cares about New York City and is someone that would be very helpful to us. So I’m certainly pleased he’ll be in that role,” de Blasio said.

“And I can say, clearly, compared to many other people who’ve been named to other positions, I find him to be a lot more reasonable and a lot more moderate.”

Experts were divided about whether the anti-nepotism law, signed by Lyndon Johnson a half-century ago, would apply.

“I would err on the side of caution and say that the statute prohibits the appointment, but far riskier would be not doing the appointment and then allowing him a significant role in policy,” said Richard Painter, a professor at the University of Minnesota Law School who served as George W. Bush’s top ethics lawyer.

Johnson signed the nepotism law in response to his predecessor, President John F. Kennedy, appointing his brother, Robert, as attorney general.

It clearly prohibits the president from appointing relatives to the Cabinet.

It’s not so clear when it comes to non-Cabinet positions in the White House.

A court ruling in 1993 clearing Hillary Clinton’s appointment to her husband Bill Clinton’s administration to work on heath-care reform may give the Trump transition team hope in fighting the law.

Two federal judges said the 1967 anti-nepotism law does not pertain to the White House.

Jamie Gorelick, a lawyer in President Clinton’s Justice Department who has been working with Kushner on clearing his potential ethical conflicts, insisted she was confident the law did not apply to White House positions.

“This is not a close question,” she told The Washington Post, citing another law passed in 1978 that she said lets the president hire White House staffers “without regard” to federal personnel laws, including the anti-nepotism statute.

In announcing Kushner’s move, Trump transition officials said Ivanka Trump will not take a White House post, opting to get the couple’s three children situated in Washington, where they recently bought a $5.5 million mansion.

Ivanka will also retain her business interests, including in the Trump International Hotel in DC and in a fashion line.

Kushner also has the backing of New York’s business community, which is counting on him for a pipeline to the White House.

“I’m hoping that he’s our Valerie Jarrett, the last person to speak to the president on matters that are important to New York,” Kathryn Wylde, CEO of the Partnership for New York City, told New York magazine, referring to President Obama’s top adviser during his eight years in office.

Kushner is expected to consult primarily on the Middle East and trade deals.