Oakland city officials and union negotiators have agreed to meeting with a state mediator on Monday to try to unstick stalled labor talks that triggered a strike that has shut down most city services for the past week.

The city announced Saturday — the fifth day of the strike — that it would agree to a mediator selected by the union. Both parties agreed to David Weinberg, a mediator and arbitrator who was a commissioner with the Federal Mediation and Conciliation Service for 17 years. Mediation was set to begin Monday.

“We have a lot of respect for Mr. Weinberg,” said Rob Szykowny, chief negotiator for Service Employees International Union Local 1021. But “just agreeing on a mediator, that doesn’t undo eight months of bad faith bargaining by the city.”

Workers will remain on strike, but if the mediation ends with an overall agreement, the strike will end, he said.

Mayor Libby Schaaf in turn criticized the ongoing strike that she said is “harming our most vulnerable residents,” including elderly people relying on senior centers and families who use Head Start.

“We will continue to work with SEIU in good faith, and remain responsible and fair to both our workers as well as our residents,” Schaaf said in a statement Saturday. “We cannot spend money we do not have, particularly as we know our pension costs are escalating at least 49 percent over the next five years. Oaklanders deserve predictable City services now and into the future.”

The development comes after Schaaf declared an impasse Friday and rejected the union’s counter-offer asking for improved pay and working conditions. Union leaders decried the declaration as “premature” but responded that they were open to state mediation, the next step of impasse procedures.

Most city services and buildings have been shut down since Tuesday, when nearly 3,000 city workers walked off their jobs and began picketing at City Hall. Police, fire and other emergency services have remained in operation.

The International Federation of Professional and Technical Engineers Local 21, which is still in negotiations, has been on a solidarity strike. Members of other unions, including the International Brotherhood of Electrical Workers Local 1245, are also refusing to cross the picket lines.

SEIU Local 1021 launched the strike after Oakland’s negotiators rejected a one-year compromise, as well as a proposal to bring in ex-San Francisco Mayor Willie Brown, a Chronicle columnist, as an informal mediator. Schaaf said he wouldn’t have been a neutral party.

The city and union had agreed on the first year of the contract, which includes a 4 percent raise for workers. The second year remains contested.

The city gave the union what Schaaf called Oakland’s “last, best and final offer” Thursday night, but the union sent a counter proposal early Friday just after midnight.

The city offered a guaranteed 1 percent raise for workers in the second year and an additional 1 percent increase that would depend on whether the city met revenue targets. The union’s counter-offer asked for a 4 percent raise in the second year, to be phased in by 1 percent each quarter.

Both sides remained at odds over whether the city proposal accounted for the rising cost of living in the Bay Area. The city said it does. The union said it does not.

Schaaf has said the union’s last proposal posed an unacceptable “level of financial risk” to the city.

Szykowny has said a large amount of the city’s financial projections “are disingenuous at best.”