The spokesperson for the Environmental Protection Agency attacked a reporter on Wednesday, referring to the journalist as a "piece of trash" when she phoned for comment on a story.

Elaina Plott, a writer for The Atlantic magazine, reported Wednesday that a top aide for the EPA had resigned, and that EPA spokesman Jahan Wilcox snapped at her when she reached out to him for comment.

"You have a great day, you're a piece of trash," Wilcox was quoted as telling Plott.

Wilcox did not immediately respond to phone calls or an email from CNN seeking comment.

scoop: Millan Hupp, EPA aide asked to find used mattress etc, has resigned. Her last day is Friday, per correspondence. Comment from Jahan Wilcox at EPA: ""You have a great day, you're a piece of trash." https://t.co/vXsD9SUmvK — Elaina Plott (@elainaplott) June 6, 2018

Jeffrey Goldberg, editor in chief of The Atlantic, tweeted, "Always a good day when our reporters get under the skin of classless flacks."

The comment from Wilcox was widely condemned online by journalists.

Related: EPA blocks CNN and Associated Press journalists from attending Pruitt speech

The EPA, under administrator Scott Pruitt, has had a tense relationship with the press.

Late last month, the federal agency blocked reporters from several news outlets from attending a national summit where Pruitt was speaking. At that event, the Associated Press said one of its reporters, who was denied entry, was grabbed by security guards and forcibly shoved out of the building after asking to speak to a public affairs person.