MTA officials and Long Island Rail Road unions, sounding more positive than in months of tense negotiations, emerged from five hours of contract talks on Thursday after failing to reach a deal, with both sides saying a union counteroffer was on the table and that talks would continue.

With nine days before LIRR workers could stage a strike, MTA chairman Thomas Prendergast and union leaders met in Manhattan at the urging of congressional members.

Anthony Simon, the unions’ head negotiator, said the presence of Prendergast at the negotiations has helped moved the discussions along.

“I think it was a good steppingstone to get the chairman in the room," Simon said. “It was a good move forward and we’ll go from there,” Simon said.

Prendergast attended the meeting with the agency’s chief labor negotiator, Anita Miller, at the urging of congressional members. They also demanded that both sides return to the bargaining table, and that the LIRR unions make the counteroffer the meeting.

“We had a very lengthy discussion. They came and made a formal counteroffer, which we discussed,” Prendergast said. “We’ve got more discussion to have with them.”

Simon said, "The counter was clarified and we made some changes."

"The chairman makes the final call. So having him in the room will always make a difference," Simon said.

"We had a very lengthy discussion," Prendergast said afterward. "They came in and made a formal counteroffer, which we discussed. We've got more discussions to have with them."

The MTA and labor representatives would not publicly disclose details of the unions’ latest proposal.