JACKSON, Miss. — Republican Sen. Thad Cochran of Mississippi on Thursday gave a farewell speech in the U.S. Senate, where he’s the longest-serving current member of Congress.

“I’m optimistic about the future of our great nation,” said Cochran, 80, who is retiring April 1 because of poor health.

Cochran served six years in the House before joining the Senate in 1978. He is the 10th longest-serving member of the Senate in history and is serving for the second time as chairman of the powerful Senate Appropriations Committee. His departure comes as Congress is voting on a product of the committee’s work — a $1.3 trillion spending bill that puts more money into the military and many domestic programs.

Senate colleagues paid tribute to Cochran, with Democrats and Republicans praising him repeatedly as a “gentle persuader” who is civil while working across party lines.

“He wrote the book on composure under pressure,” Senate Majority Leader Mitch McConnell of Kentucky said during the session shown on CSPAN2.

Minority Leader Chuck Schumer of New York said Cochran sought and received his support for Gulf Coast projects after Hurricane Katrina in 2005. Years later, Cochran helped the Northeast after Superstorm Sandy.

“He had a long memory and knew how to work the legislative process,” Schumer said.

Democrats and Republicans talked about Cochran’s love of music and literature and the genuine interest he showed in meeting people when he traveled to other states and countries.

“He was nice to everyone, from the elevator operators to the highest officials around the world,” Republican Sen. Susan Collins of Maine said.

Nearly three years remain in Cochran’s term, and Republican Gov. Phil Bryant on Wednesday appointed Mississippi Agriculture Commissioner Cindy Hyde-Smith to temporarily succeed the senator. A nonpartisan special election will take place in November and the winner will complete Cochran’s term, which ends in January 2021.

Hyde-Smith, who pledged Tuesday to support President Donald Trump, will face at least two other candidates — Democrat Mike Espy, a former U.S. House member who served as President Bill Clinton’s first agriculture secretary, and tea party-backed Republican state Sen. Chris McDaniel, who nearly unseated Cochran in a bitter 2014 Republican primary.

Hyde-Smith will be the first woman to represent Mississippi in Congress. She served 12 years in the Mississippi Senate as a Democrat before becoming Republican in late 2010 and winning the statewide race for agriculture commissioner in 2011. McDaniel sent a fundraising email Wednesday criticizing Hyde-Smith: “Apparently, McConnell and his cronies would rather have another liberal Democrat in Washington than a principled conservative Republican.”

Republicans are trying to maintain their thin Senate majority. Although Mississippi is conservative, GOP leaders are wary about splitting the party and losing a seat to a Democrat after something similar happened last year in Alabama.

Andy Taggart, an attorney who was chief of staff for Republican Gov. Kirk Fordice in the 1990s, said Wednesday that he might run in the special election to try to prevent either McDaniel or a Democrat from winning. Taggart said McDaniel showed a “lack of respect” for Cochran in the 2014 race.

____

Follow Emily Wagster Pettus on Twitter: http://twitter.com/EWagsterPettus .