The longest-serving Republican in the Minnesota House delivered some sharp criticism of his party in his farewell speech on the House floor Friday.

"The Republican Party in which I believed has at times shown inflexible adherence to the rhetoric of 'the principle of the day," said Rep. Steve Smith, R-Mound, who lost his party's primary Aug. 12 to a Tea Party candidate, Cindy Pugh.

House Speaker Kurt Zellers, R-Maple Grove, and other party leaders supported Pugh in the race, despite the fact that Smith has served in the House since 1991.

"My hopes is this -- that the two-party system of civility and survival will be restored," Smith said. "And Minnesotans shall prevail. God will help free people who work together."

Smith ran afoul of party activists due to his defense of organized labor, and he was not happy with his party's stance in dealing with DFL Gov. Mark Dayton.

"I have stood with Republicans like Teddy Roosevelt in defending the right of free men and women to negotiate for safer working conditions, reasonable benefits, and fair pay in return for their labor," he said, reading a statement as the House concluded its flood-relief session.

"I got to be a voice for the old Republican Party that was a legitimate and honorable strand of our American and Minnesota heritage," he said. "We were committed to doing well what had to be accomplished, and doing without those things which people could do for themselves."

"The watchwords 'balance and respect' were also learned and observed from another of my friends from the House, Speaker Margaret Anderson Kelliher, who showed you can avoid deadlock and disgrace if you work with a governor from a different party," he said. Kelliher was DFL speaker from 2007-2011, when Republican Tim Pawlenty was governor.

Smith added: "If you want Minnesota to succeed, you cannot hope that our governor will fail."

Smith's voice quaked at times during his speech. He mentioned several public-safety measures he championed, including felony domestic abuse law, life without parole for the worst sex offenders and attacking the problem of meth labs.He also mentioned working on an abortion waiting period law and on concealed weapons permit expansion.

House members stood and applauded when Smith finished what will probably be his last speech as a legislator.

Asked what he thought, Zellers said he was proud to have worked with Smith on the sex-offender bill. "I don't see anything wrong with what he said," Zellers said.