Retiring Republican Rep. Ryan Costello said President Trump was wrong to blame lack of loyalty to him as reasoning why several Republican lawmakers lost their election bids on Tuesday.

On MSNBC Thursday, Costello (R-Pa), a lawmaker from the suburbs northwest of Philadelphia, said many of the people who lost were "the folks on the front lines who were putting up the toughest votes in order to get the legislative victories that this president has had."

Host Craig Melvin noted that Costello also blasted Trump on social media, where he wrote that "to bite [your] lip more times you'd care to, to disagree and separate from POTUS on principle and civility in [your] campaign -- to lose [because] of POTUS and have him p--- on you angers me to my core."

Costello said it is unclear why Trump would attack people who were on the "offensive line" in the GOP, saying "things aren't quite adding up."

Trump called out defeated Republican Reps. Carlos Curbelo of Florida, Mike Coffman of Colorado, Peter Roskam of Illinois, Mia Love of Utah and New Jersey U.S. Senate candidate Bob Hugin as lawmakers who kept their distance from him during the campaign. 

"We had some who decided 'let's stay away'," Trump said Wednesday. "They did very poorly."

Costello said that in Pennsylvania, where Democrats like incoming Reps. Susan Wild (D-Lehigh) and Chrissy Houlahan (D-Chester) took seats previously held by Republicans, some voters saw Trump as effectively on the ballot in races that had little to do with him.

Kennedy: Trump Endorsed Pelosi for Speaker Because She's the 'Perfect Foil for Him'

'We're Hitting the Road': MS GOP Sen. Hyde-Smith Encouraged Ahead of Runoff Election

Costello said that in the Philadelphia suburbs, several long-tenured GOP state and local lawmakers lost their re-election bids because many voters said they're "not voting for any Republicans."

"They would have done worse," Costello said, adding that to see it otherwise would be "ignoring reality."

Costello previously said he was "disgusted" by Trump's remarks.

Gingrich: Trump Should 'Focus on Being President,' Not Opposition to Pelosi

Judge Nap: Whitaker Not 'Legally Qualified' to Be Acting Attorney General