Union leaders are optimistic that their rank-and-file membership will ratify the tentative contract hammered out Tuesday morning after a marathon 21-hour negotiating session with Rural/Metro Medical Service, and those leaders hope that vote occurs within a week.

The two sides agreed to a new four-year contract at about 7:30 a.m. Tuesday, ending a strike that lasted less than eight hours and bringing some of the approximately 400 EMTs and paramedics back to work as soon as late in the morning.

The agreement, slated to be retroactive to July 1, now will be subject to a vote by the membership.

“The union is optimistic,” said Kevin C. Drysdale, president of Teamsters Union Local 375. “We are endorsing it to the membership for ratification.”

Union officials added that the new pact includes a wage increase and benefit improvements, but Drysdale wouldn’t be more specific.

“It’s going to be more in line with what the union expected than what the company had offered,” he added.

The agreement hammered out by the weary parties ended the strike almost as soon as it started.

“We did come to a positive resolution after many days of negotiations,” Jay Smith, division general manager for Rural Metro, said Tuesday. “We’re just happy to have everybody come back to work.”

Close to 100 replacement workers from outside the region already were in town, as of Sunday, and the first of those crews began working at midnight Monday.

“Fortunately, it was only for a 12-hour shift,” Smith said. “It was a large mobilization effort, but it’s much better to have our own people back.”

Crews began returning to work late Tuesday morning, with regularly scheduled shifts resuming by 4 p.m., Rural/Metro officials stated.

Erie County Executive Mark C. Poloncarz previously expressed concerns about out-of-state workers having to navigate through local streets on emergency calls.

“Public safety is our priority,” Drysdale said after the agreement was reached. “We all recognize that. We all live in the community.”

Wages were the last issue on the table, union officials said. Two weeks ago, Rural/Metro paramedics and EMTs rejected a contract proposal from the company in a near-unanimous vote.