Michael Cohen, President Donald Trump's longtime lawyer, resigned from his job at the Republican National Committee on Wednesday.

In a letter to RNC Chairwoman Ronna McDaniel reviewed by ABC News, Cohen said he resigned because of the ongoing investigations he has found himself swept up in and because of the president's much-maligned family-separation policy at the US-Mexico border.

Michael Cohen, President Donald Trump's longtime lawyer, resigned as the deputy finance chairman of the Republican National Committee's finance committee, sources close to the RNC told ABC News on Wednesday.

In doing so, Cohen criticized the president's much-maligned family-separation policy at the US-Mexico border in a rare rebuke of his old boss.

In a resignation letter to RNC Chairwoman Ronna McDaniel reviewed by ABC News, Cohen said he was departing in part because of the multiple investigations he has found himself tied up in. Cohen is a person of interest in the special counsel Robert Mueller's investigation into Russian interference in the 2016 US election, and he is the focus of a criminal investigation in the Southern District of New York into possible campaign-finance violations, bank fraud, wire fraud, illegal lobbying, and other potential crimes.

"This important role requires the full time attention and dedication of each member," Cohen wrote, according to ABC News. "Given the ongoing Mueller and SDNY investigations, that simply is impossible for me to do."

Cohen then criticized Trump's immigration policy.

"As the son of a Polish holocaust survivor, the images and sounds of this family separation policy is heart wrenching," Cohen wrote. "While I strongly support measures that will secure our porous borders, children should never be used as bargaining chips."

Outrage over the policy, which began just weeks ago, has reached a fever pitch as images and audio of children crying at detention facilities after being forcibly removed from their parents have emerged. Children are being held in the facilities as their parents are prosecuted on charges of illegal entry into the US, a misdemeanor.

The Trump administration has called it a "zero tolerance" policy for illegal entry into the US. It prioritizes prosecution for adults who enter illegally, causing any children they're traveling with to be immediately taken from them.

The administration views the policy as both a deterrent for illegal entry and a possible negotiating chip for the president to secure the hardline immigration legislation for which he clamors. More than 2,000 children have been separated from their parents at the border since the policy was implemented, according to the Department of Homeland Security.

An RNC official told Business Insider that McDaniel accepted Cohen's resignation, adding that he had been "inactive on the committee for several months."

On Tuesday, Cohen hired Guy Petrillo, a former top prosecutor with the US Attorney's Office for the Southern District of New York, as his new lawyer. Some experts said this hiring could be a sign he is willing to cooperate with investigators.