Ailing Sen. Tom Libous is back at the Capitol on Tuesday following several cancer surgeries, an infection and a prolonged recovery period.

He was initially due back to the Capitol on Monday for the final days of the legislative session, but that was postponed as he continues to recover.

“First of all, it feels great to be alive and it feels great to be back here,” Libous said in an interview. “There was a time when we weren’t too sure we were going to make it back. It was pretty rough.”

Libous, a Binghamton Republican and the number two lawmaker in the GOP conference, faced severe complications last month from an infection.

“I was very closely watched the emergency room,” Libous said. “They had to do a second back surgery and go after the infection.”

The lawmaker, in a wheelchair, met briefly with Senate Majority Leader John Flanagan before heading to the chamber to the applause of his colleagues.

Libous’s office had warned colleagues and well wishers to go easy on him give his weakened condition and the lawmaker did appear to be frail and to have lost significant weight.

It has been a difficult year for Libous, who also faces a charge of lying to the FBI in connection to a case involving his son being employed by a politically connected law firm in Westchester County. His son, Matthew Libous, was sentenced to six months in federal prison for tax fraud.

Meanwhile, Libous returns to the Capitol while state lawmakers in both the Republican-led Senate and Democratic-controlled Assembly sort out an extension of rent control laws for New York City as well as an extension of mayoral control of New York City schools and the creation of an education tax credit.

His presence matters: Republicans have 33 members, counting Democratic Sen. Simcha Felder, in the narrowly divided chamber.

“I’m excited about it, I’m thrilled about it and I’m looking forward to doing what I can to close out the last few days of session,” Libous said. “I’ve been doing this for 27 years. It’s my life, it’s part of my life. I want to finish out this session.”