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

A State Department science envoy quit Wednesday, citing President Donald Trump’s “attacks on core values of the United States" in a scathing resignation letter that also featured an acrostic poem spelling out “IMPEACH."

Daniel Kammen, a professor of energy at the University of California, Berkeley who’d been appointed as a science envoy in February 2016 and whose position was set to end next month, wrote that he found it “particularly troubling” how Trump’s "response to Charlottesville is consistent with a broader pattern of behavior that enables sexism and racism, and disregards the welfare of all Americans, the global community and the planet.”

Kammen’s role was part of State Department program where scientists work in conjunction with the agency for one year in a public diplomacy role where they are given a region and a goal to increase collaboration among scientists in their specific scientific area.

"Today, Dr. Daniel Kammen made a personal decision to resign. We appreciate his dedicated service to U.S. scientific diplomacy during his appointment working on energy efficiency and renewable energy in Africa as a Science Envoy," a State Department spokesperson said.

The first letters of each paragraph of Professor Daniel Kammen's resignation letter to President Trump spell out "IMPEACH." Letters circled in red by NBC News. @dan_kammen via Twitter

Kammen also cited Trump’s decision in June to withdraw the United States from the Paris Climate Accord as a reason for his departure as well as what he said was Trump’s decision to “undermine energy and environmental research."

He may have been referring to accusations that a senior official in Trump’s EPA was trying to "marginalize" and "politicize" scientific data used to shape agency policy at the agency.

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

“Acts and words matter,” Kammen wrote. “To continue in my role under your administration would be inconsistent with the principles of the United States Oath of Allegiance to which I adhere.”

It wasn’t just the sharpness of Kammen's letter that attracted attention, however.

The professor used the first letter of each of his seven paragraphs to spell out “IMPEACH” — a tactic that delighted liberal spheres of Twitter.

But in an interview with NBC News, Kammen said, despite his clever ruse, he “did not make this decision lightly.”

Scientists and engineers have used the Science Envoy program to grow U.S. bilateral science and technology relationships, advance “policy objectives such as increasing the number of women in science and advocating for science-based decision-making” and to promote science education in American classrooms, according to the State Department.

Kammen, who had previously served in various roles in other administrations including that of President George W. Bush, said he hadn’t always agreed with the choices of presidents he worked under, but felt Trump’s decisions were different.

Kammen said he’d begun thinking about leaving the position early after the administration chose to pull out of the Paris deal, but made the final decision following the president’s response to Charlottesville and his comments this past weekend.

President Donald Trump speaks to the National Convention of the American Legion in Reno on Aug. 23. Joshua Roberts / Reuters

Trump's remarks about the violence earlier this month in Charlottesville — he told reporters counter-protesters demonstrating against white nationalism were also to blame for the violence at race-fueled riots and then railed against the movement to remove "beautiful" Confederate statues and monuments in cities across the country — have prompted a rash of resignations from bodies affiliated with his administration.

And Kammen's resignation letter wasn't even the first of Trump's administration to feature a hidden acrostic message.

All 17 seventeen members of the President’s Committee on the Arts and Humanities resigned last Friday, citing Trump's Charlottesville response. The first letter in the first word of each of their note's paragraphs spelled out "RESIST."

Earlier in the week, several members of Trump’s Manufacturing Council also quit, as public pressure mounted on executives in the group to disavow his Charlottesville comments.

Trump eventually disbanded the panel, along with another business advisory council called the Strategic and Policy forum, altogether.