Gov. Dannel P. Malloy’s relationship with the labor community that helped get him elected has been rocky at times. But his message to a group of nearly 200 construction workers Thursday was clear — “We do not have to agree on every political issue every time, but we can never be divided.”

Malloy’s comments came during something of a victory lap celebrating the Senate’s late-night passage of a bill allowing public entities to negotiate working conditions with labor unions before a construction project goes up for bidding.

The bill was expected to be controversial but found support even among most Republican senators Wednesday night because its language on Project Labor Agreements was permissive.

The governor received a warm welcome from the unionized construction workers, even as his sweeping education reform proposal remains a point of bitter contention among the state’s teachers unions.

“Before Gov. Malloy, we couldn’t get within 100 yards of the governor’s office. Now we have a seat in the governor’s office. He’s a friend,” said David Roche, president of the State Building & Construction Trades Council.

Malloy took the opportunity to tout his labor credentials, saying his office helped draft the PLA language for the bill. He also pointed to his efforts to give new groups of workers the right to collectively bargain. He said Connecticut stood in stark contrast to the anti-labor sentiment present in other states.

“Where there is a broad assault on the right of men and women to organize, a broad assault on the middle class . . . we have to stand in the breach,” Malloy said to applause.

There’s also likely a stark contrast between how the construction unions view the governor and how the teachers unions perceive him.

Malloy announced his priorities for what he planned to be the year of education reform late last year. And early on, he and the Connecticut Education Association, the state’s largest teachers union, seemed at least in partial agreement.

In January, Malloy’s Education Commissioner Stefan Pryor and CEA Executive Director Mary Loftus Levine appeared at the same press conference where Pryor highlighted the areas where the administration and the union were in agreement on reform.

But whatever spirit of cooperation there was, it seemed to sour after the session’s opening day when many teachers took exception to the governor’s allegation that the only thing teachers had to do to earn tenure was to “show up for four years.”

Malloy has since tried to explain the comment but teachers haven’t been shy about expressing their displeasure. He was met by angry educators in New Haven in March, when they booed him as he was trying to explain the reform package.

CEA also has launched several ads attacking the governor’s proposal as “a bad experiment.”

With less than a week left in the legislative session, Malloy’s education package is still a work in progress. The administration has been negotiating the bill with legislative leaders behind closed doors since the Education Committee altered the bill so much that Malloy threatened to veto it.

While the governor may be unpopular with the teachers unions, the PLA bill wasn’t the only evidence of Malloy’s pro-labor agenda on display Thursday. The Senate was expected to take up a bill extending the right to collectively bargain to some day and home care workers.

Malloy set the bill in motion when he issued two executive orders that allowed both home care workers and daycare workers to vote and form unions. That effort has already made the governor the subject of three lawsuits claiming he overstepped his constitutional authority.

At the PLA rally, SEIU Director Paul Filson urged construction workers to lobby for the bill.

“SEIU, just like you, is working every day to grow the labor movement, to organize new workers,” he said. “We’re working to expand the labor movement by 12,000 new workers . . . By bringing in new union members to Connecticut we’re going to have a stronger voice.”