Utility workers have capped a gas leak at Main Street and Gerry Avenue in South Portland but a swath of customers between there and Scarborough will be without gas service for hours.

Construction crews working on Main Street ruptured the underground four-inch gas supply line about 8:30 a.m. Firefighters evacuated a dozen buildings, including businesses, homes and the Maine Motel at 606 Main St.

Firefighters checked for gas levels inside the building and found none, but kept people out as a precaution, said Robb Couture, a Fire Department spokesman.

Crews expected to be at the scene for four hours while repair work was underway. Main Street has been reduced to one lane from Cash Corner to the Maine Turnpike spur and motorists are urged to avoid the area. Once the line is repaired, crews for the gas utility Unitil will relight the gas service in the area where service was disrupted.