Thousands of cleaning employees in Washington, Maryland and Virginia have secured a new four-year contract that guarantees pay raises and averts a possible strike.

Union representatives for 12,000 of the region’s office cleaners reached an agreement with the Washington Service Contractors Association on Sunday night. The contract had been set to expire at midnight Monday.

The new agreement, subject to ratification by the membership, includes an average annual pay increase of 4 percent.

“This is not just a win for working families and our communities, but it ensures tenants will receive professional service and gives our economy a much-needed boost,” said Jaime Contreras, capital area director of the 32BJ, an affiliate of Service Employees International Union.

The cleaners’ union and the association, which represents the major commercial cleaning companies in the area, had been in negotiations since Sept. 8. The cleaning companies said during the negotiations that they wanted to maintain the old contract at least a year because they are still struggling in the current economy.

Last week 32BJ extended the contract from the Oct. 15 expiration date to Monday at midnight to avoid a strike over the weekend. But they threatened to go on strike this week if they couldn’t reach an agreement.

“These things go down to the wire,” SEIU spokeswoman Julie Karant said Friday.

Earlier in the negotiations, the union rejected a proposal that provided a 25-cent raise and did not address a request to make 1,000 part-time employees full-time with health insurance.

Sunday night the union agreed to leave the request about the 1,000 jobs open to discussion, Karant said. It “will be worked out at some point,” she said.

Employee wages under the old contract ranged from $9 per hour for 9,600 part-timers to $12.60 per hour for the 2,400 full-timers.

Approximately 5,000 work in buildings in the District, nearly 4,000 in Northern Virginia, more than 1,500 in Montgomery County and about 700 in Baltimore.

In 1996, the unionized workers went on a strike that lasted about six months.