Labour would have lost its majority on City of York Council were it not for the general election, the Liberal Democrats group leader said.
Cllr Nigel Ayre said incoming green waste charges and planned library cutbacks had cost the ruling Labour group votes in the Hull Road by-election.
He said Labour now had nowhere to hide now that their party was in government in Westminster.
Labour’s John Moroney held the Hull Road seat for the party with 1,203 votes, with Liberal Democrat Andrew Mortimer coming second with 1,008.
Green Ben French finished third with 602 votes while Conservative Ellis Holden came fourth with 314.
The result saw Labour keep its outright majority of 24 out of the council’s 47 seats.
But Cllr Ayre said the Hull Road result was stunning given the increased turnout for the general election, with both held on Thursday (July 4).
The Liberal Democrat pointed to incoming charges for green waste collections and the decision to cut £600,000 from library budgets over two years as factors in the result.
The opposition leader said: “It is clear that Labour have lost their way when they approved the deeply unpopular green bin tax and cuts to York’s libraries.
“Even delaying the green bin tax until after this by-election couldn’t stop Labour losing votes.
“If this by-election didn’t take place on the same day as the General Election, Labour would have lost their majority on the council.
“They can no longer blame a Conservative government for their shortcomings on their promises to deliver free school meals for all children, freeze council tax and deliver neighbourhood caretakers for all communities.”
‘Positive campaign’
Labour group leader Cllr Claire Douglas said the result was never in doubt for them and accused the Liberal Democrats of running a negative campaign.
She said the voters in Hull Road had responded to their positive campaign, adding: “John’s going to be a fantastic councillor for the ward.
“It shows that Labour continues to have a great track record on delivering free school meals, affordable housing and reversing the blue badge ban.”