President Donald Trump praised Conor Lamb, the winner of the Congressional special election in Pennsylvania, for running a smart campaign on his agenda.

“He said very nice things about me. I kept saying, is he a Republican? He sounded like a Republican to me,” Trump said. “But I guess when you’re popular in a certain area, that’s probably a good tactic.”

Trump made his remarks during a closed-door fundraiser in Missouri on Wednesday evening. Audio of his remarks leaked to several media outlets.

“It’s a pretty smart race, actually,” Trump admitted. “But he ran and he ran on that basis. But the bottom line is when he votes, he’s going to vote with Nancy Pelosi … he’s not going to vote with the Republicans. So it doesn’t matter, what he feels doesn’t matter.”

Lamb won the race with a 627-vote lead against Republican candidate Rick Saccone in a Pennsylvania district that Trump carried by nearly 20 percentage points in 2016. Lamb was elected to replace Republican Rep. Tim Murphy who resigned after it was revealed he urged a woman he had an affair with to get an abortion.

Lamb will serve in Congress until November when he faces re-election.

“It’s a lot of work for five months,” Trump said, noting that the congressional seat would soon be redistricted in the state.