President Barack Obama criticized Sen. Pat Toomey (R-Pa.) Saturday for featuring him in in his latest campaign ad, making clear he does not support the senator’s reelection bid.

The ad features Obama speaking outside the White House in 2013, when he praised Toomey and Sen. Joe Manchin (R-W.Va.) for their bipartisan ― but ultimately unsuccessful ― efforts to pass gun control legislation.

“That was not easy,” Obama said, praising the senators’ “courage.”

The new ad released Friday is airing in the Philadelphia and Pittsburgh cable markets. Watch it below:

Obama said in a statement released Saturday afternoon that Toomey did “the right thing” on this one issue but said that doesn’t mean he should be reelected:

Pat Toomey may have done the right thing on one vote, but courage is telling Pennsylvania voters where you stand on the tough issues, not just the easy ones like background checks. Pat Toomey won’t tell Pennsylvania voters where he stands on Donald Trump, trying instead to have it both ways by telling different people what he thinks they want to hear. That’s not courage. Voting to shut down the government and against bills to close the terrorist gun loophole isn’t courage. And playing politics with the Supreme Court isn’t courage. I support Katie McGinty for Senate because she will always do the right thing for Pennsylvania families.

Toomey is in a tough reelection fight against Democrat Katie McGinty, a former environmental official in the state and in former President Bill Clinton’s administration. The race has become the most expensive Senate contest of all time.

The Pennsylvania senator has been trying to pull off a tricky strategy of keeping the Republican base with him, while also trying to pick off some Democratic voters in the blue-leaning state. He has refused to say whether he will vote for GOP nominee Donald Trump for president, for example, unwilling to risk alienating either group.

Toomey ― who has one of the most conservative voting records in Congress ― has also been airing other ads featuring praise from Democrats, while simultaneously putting up spots bashing the party’s presidential nominee, Hillary Clinton.

“Pat Toomey is proud of his ongoing bipartisan work to keep guns out of the hands of criminals and the dangerously mentally ill and we will continue to highlight that record,” Toomey spokesman Ted Kwong said in a statement. “It’s clear this election is a choice between Pat’s record as an independent voice and Katie McGinty’s history of rubber-stamp partisanship and ethics problems.”

While Toomey has worked across the aisle on issues like background checks and the opioid epidemic, he has, overall, been a consistent critic of Obama’s agenda and frequently criticizes the president on the campaign trail.

Toomey also blamed Obama himself for the failure of the background check legislation, which the White House supported.

“I would suggest the administration brought this on themselves,” Toomey said in 2013. “I think the president ran his re-election campaign in a divisive way. He divided Americans. He was using resentment of some Americans toward others to generate support for himself. That was very divisive, that has consequences, that lingers.”

Toomey isn’t the only Obama critic to use the president ― whose approval rating continues to rise ― in a campaign ad. Rep. Darrell Issa (R-Calif.) recently sent his constituents a mailer featuring words of praise for the congressman from Obama.

“Now, that is the definition of chutzpah,” Obama responded. “Here’s a guy who called my administration perhaps the most corrupt in history ― despite the fact that actually we have not had a major scandal in my administration.”

HUFFPOST READERS: What’s happening in your state or district? The Huffington Post wants to know about all the campaign ads, mailers, robocalls, candidate appearances and other interesting campaign news happening by you. Email any tips, videos, audio files or photos to scoops@huffingtonpost.com.



Want more updates from Amanda? Sign up for her newsletter, Piping Hot Truth.



Enter your email address: