Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A longtime Hillary Clinton aide who insiders say has made it his mission to know all the Democratic candidate's weaknesses is role-playing Donald Trump in her debate prep, two sources confirmed to NBC News.

Philippe Reines, who worked for Clinton in both the Senate and State Department, is standing in for the Republican nominee during mock sessions this weekend in and around Clinton's Chappaqua, New York, home.

Philippe Reines with then-Secretary of State Hillary Clinton in Washington, D.C., on May 19, 2011. The Washington Post / The Washington Post/Getty Images

There was earlier speculation that a bombastic comedian or politician — even the likes of Mark Cuban, Alec Baldwin or Sen. Al Franken — would take on the role. But sources said someone like Reines could be better suited because of his close personal ties to Clinton and knowledge of her strengths and weaknesses.

And like Trump, Reines doesn't usually hold his tongue. In her memoir “Hard Choices,” Clinton praised Reines as smart and loyal, and wrote of him, “I can always trust him to speak his mind.”

Follow NBC News' latest presidential debate coverage here

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Reines has worked for Clinton since 2002, serving as a senior communications adviser for her when she was secretary of state.

He traveled with her to more than 100 countries. As part of his job, Reines was in charge of guarding Clinton from criticism, and as a result, sources told NBC News, he made a point of knowing all her pitfalls — past and present, personal and professional.

That intimate knowledge made him an ideal choice for debate practice, as Reines isn't afraid to lob embarrassing insults at Clinton, sources say.

He also doesn't shy away from testy encounters with reporters: He famously told late Buzzfeed political reporter Michael Hastings to "f--- off" in a terse email exchange in 2012.

A native New Yorker who graduated from Columbia University with a political science degree, Reines' work for Clinton hasn't been without controversy. In 2009, as the Obama administration was emphasizing the need to reset America's relationship with Russia, Clinton presented Russian Foreign Minister Sergei Lavrov with a gift in Geneva.

Lavrov opened the box to find a red button with the word "peregruzka" printed on it.

"We worked hard to get the right Russian word [for 'reset']. Do you think we got it?" Clinton asked.

Philippe Reines photographed inside the U.S. State Department in Washington, D.C., on May 19, 2011. The Washington Post / The Washington Post/Getty Images

Lavrov, laughing, told her she hadn't.

"It should be 'perezagruzka,'" he said. "This says 'peregruzka,' which means 'overcharged.'"

Reines took responsibility.

"While the Russians laughed off the error and accepted the gift in the spirit of cooperation that it was meant, I've been sic [sic] about the mistake since, especially that I let down the Secretary and the fine professionals at the State Department,” Reines said in an email to Politico at the time.

The Clinton campaign has managed to keep most debate prep specifics under wraps, and aides this week even expressed surprise that any internal information had not yet leaked. The New York Times first reported Reines' debate prep role late Friday night.

Clinton, who has nearly 40 debates under her belt while running for political office over the years, spent four days off the trail this week alone and had no public events scheduled over the weekend.

Last week — due to her bout with pneumonia — Clinton also took three full days off, part of which she spent studying debate materials, according to aides.