President Trump on Thursday used a taxpayer-funded trip to Illinois to openly advocate for electing Republicans to Congress — blurring the line between official and political events in the heat of the midterm campaign season. 

“You’ve got to vote Republican, folks, you’ve got to vote Republican,” Trump said during the speech at a steel plant in Granite City, Ill.,  that had recently reopened. “Vote for these two congressmen; they know what we’re doing. They know what they’re doing. They’re tough, and they’re smart.”

Trump didn’t name the lawmakers, but three Illinois Republicans accompanied him during his tour of the plant, according to the White House: Reps. Mike Bost, Rodney Davis and John Shimkus. Bost represents the district Trump traveled to on Thursday and has been one of the most fervent Republican supporters of the president’s tariffs on steel and aluminum imports.

White House spokesman Hogan Gidley told reporters on Air Force One that “there is no legal prohibition” on endorsing political candidates at official, taxpayer-funded events. 

“It is no surprise that the president would want people in Congress who support his agenda,” Gidley said. “These were official events talking about the economic impact this president has had in the Midwest.”

Noting the deal this week between the United States and the European Union to defuse trade tensions, Trump also accused China of retaliating against the United States on trade to get Democrats elected this fall.

“China tried to hurt the American farmer,” Trump said, “because that way, they were going to hurt me, and that way, you would go in November and you would vote for people that don’t want borders, they don’t care about crime, they want to get rid of ICE — Democrats.”

In a trade-focused swing through the Midwest on Thursday, Trump not only promoted his tariff policies and touted his agreement with the E.U. to calm an escalating trade war but also blasted Democrats over immigration and complained about the news media.

As he had done in previous public speeches, Trump falsely claimed that he won the women’s vote against Hillary Clinton in 2016. He won the white women’s vote, according to exit polling, but he lost the overall women’s vote to Clinton, with 54 percent of women supporting the Democrat and 41 percent backing him. 

“I did win that women’s vote, didn’t I?” Trump asked, to applause. “Remember they said, ‘Why would women vote for Trump?’ Well, I don’t know, but I got more than she did, that’s pretty clever.”

In a contentious week for the relationship between the White House and its press corps, Trump also repeatedly referred to the news media and the cameras that had followed him to Granite City, saying that the media never followed his predecessors and that reporters were overly scrutinizing his every word.

“They’re dying to see us make a little bit of a mistake. They analyze every word. They say, ‘Did he say that? Could it have been? Did he say something positive about Russia? I think he loves Russia,’ ” Trump said, mocking a journalist. “They analyze every single word, and they follow us. And you know what? The good news is: We can get the word out.”

Of his recent trip to Europe, Trump said: “They said I was too nasty to NATO and too nice to Russia. Figure that one out.”

He proudly proclaimed that “U.S. steel is back,” and his daughter Ivanka Trump, a White House senior adviser, briefly got on stage to tell the crowd that “this administration loves its steel workers.”

Trump also talked of the United States getting “ripped off” on trade in the past and said: “Together, we’re sending a message to our foreign competitors. The days of plundering American jobs and wealth . . . those days are over.”

“We will not let anyone bully our wonderful American farmers,” Trump said. “We are going to stick together and win for our farmers and our factory workers, our steelworkers, here we are, all across this nation.”