Trump reserved particular ire for Tester, who had a role in publicizing workplace misconduct allegations against Ronny Jackson, Trump's pick to lead the Department of Veterans Affairs.

The president told supporters not to get "complacent" and elect more Republicans in November's midterm elections.

President Donald Trump targets Sens. Jon Tester, Bill Nelson and Bob Casey by name as he speaks to gun rights supporters.

President Donald Trump gestures before he speaks at a National Rifle Association (NRA) convention in Dallas, Texas, U.S. May 4, 2018. Lucas Jackson | Reuters

President Donald Trump took swipes at three Democratic senators by name Friday, as he urged gun rights supporters to elect more Republicans in November in order to boost his agenda. The president lamented that the 51 seats Republicans currently hold in the Senate are "not really a majority." Trump contended the Senate needs more GOP members after November's midterm elections to pass tougher immigration laws, confirm conservative judges and push back against new gun restrictions. "We need Republicans to do it right, to get the kind of things we want. We've got to get Republicans elected. We've got to do great in 2018," the president told the National Rifle Association's annual meeting in Dallas.

Trump warned his supporters not to get "complacent" in a midterm election year. He noted that the president's party often gets clobbered in off-year elections and said, "We can't let that happen." Democrats aim to pick up seats, and potentially a majority, in the House in November amid party enthusiasm and poor approval ratings for Trump and major Republican policies. They face a tougher task in the Senate, where Democrats and independents who caucus with them have to defend 26 seats, including 10 in states Trump won. The GOP sees the potential to even gain Senate seats in November. On Friday, Trump went after some of those Democrats defending their Senate seats.

He slammed Sen. Jon Tester, D-Mont., who will run this year in a state Trump won by about 20 points. Tester, as the ranking member on the Senate Veterans Affairs Committee, had a role in going public with workplace misconduct allegations against the president's pick to lead the Department of Veterans Affairs, White House physician Ronny Jackson. Though he denied the accusations, Jackson, a Navy rear admiral, eventually dropped out of consideration for the job. While several bipartisan senators shared concerns about the allegations against Jackson, Trump has publicly lambasted Tester over the events. "Senate Democrats like Jon Tester. You saw what happened there. What he did to one of the finest people in our country. What he did to the admiral — what he did is a disgrace," the president said Friday. Trump also targeted Sens. Bill Nelson, D-Fla., and Bob Casey, D-Pa., on Friday. Trump criticized the senators, who both face re-election fights this year, for voting against his immigration priorities.

The president won both of their home states in 2016, albeit by much narrower margins than he carried Montana. Nelson will likely face a well-funded and broadly popular Trump ally in Florida Gov. Rick Scott. Early polling shows a tight race. Casey is expected to go on to face Rep. Lou Barletta, R-Pa. Early polls indicate a comfortable lead for the Pennsylvania Democrat. Representatives for Tester, Nelson and Casey did not immediately respond to requests to comment. The president will likely take more swipes at an endangered Senate Democrat next week. He will head to Indiana for a campaign-style rally on Thursday, two days after the GOP will select a challenger who will face Sen. Joe Donnelly, D-Ind., in November. Trump won Indiana by about 20 points in 2016 and Mike Pence was governor of the state before he became vice president.

WATCH: Trump said a gun would have made a difference in Paris shooting