The House on Tuesday voted to formally condemn President Trump's racist tweets telling Democratic congresswoman of color to "go back" to where they came from. But long before that, the federal agency charged with enforcing anti-discrimination laws offered up that phrase as an example of potentially illegal harassment.

The U.S. Equal Employment Opportunity Commission (EEOC) specifically cites the phrase "Go back to where you came from" as the type of language that could violate anti-discrimination employment laws in certain circumstances. The phrase is nearly identical to what Mr. Trump wrote in his tweets about the congresswomen: "Why don't they go back and help fix the totally broken and crime infested places from which they came."

"Ethnic slurs and other verbal or physical conduct because of nationality are illegal if they are severe or pervasive and create an intimidating, hostile or offensive working environment, interfere with work performance, or negatively affect job opportunities," the EEOC's website says. "Examples of potentially unlawful conduct include insults, taunting, or ethnic epithets, such as making fun of a person's foreign accent or comments like, 'Go back to where you came from,' whether made by supervisors or by co-workers."

Get Breaking News Delivered to Your Inbox

It classifies such comments as examples of "harassment based on national origin."

Sen. Tim Kaine, D-Virginia, highlighted the EEOC's rule on Twitter and wrote, "The President's bigoted words are so contrary to who we are as a country that we literally have laws against them."

The EEOC cites “go back to where you came from” as a classic form of discrimination that violates civil rights. The President’s bigoted words are so contrary to who we are as a country that we literally have laws against them. pic.twitter.com/FcD1TcKcKE — Tim Kaine (@timkaine) July 16, 2019

The federal anti-discrimination law does not directly apply to Mr. Trump's tweets, since the four congresswomen he targeted are not his employees. But his comments sparked a political uproar, and prompted an outpouring online from immigrants and people of color, including a number of celebrities, who shared their own memories of being told to "go back" to where they came from.

The House resolution approved Tuesday condemned the president's tweets as "racist comments" that have "legitimized and increased fear and hatred of new Americans and people of color." It is the first time the House formally rebuked a president in more than 100 years.