The drawbridge in the middle of the heavily traveled Woodrow Wilson Bridge became stuck slightly ajar yesterday morning because of an electrical failure, triggering a massive traffic tie-up that delayed thousands of rush-hour commuters.

Cars on the Capital Beltway were backed up for about 4 miles on the Maryland side of the bridge and about 2 1/2 miles on the Virginia side, according to state police. The mile-long bridge, undergoing extensive repairs scheduled to last until mid-September, carries the Beltway across the Potomac River between Prince George's County and Alexandria. More than 120,000 motorists are estimated to use the bridge daily.

The traffic snarl spilled onto major arteries in Maryland, Virginia and the District of Columbia as commuters searched for other routes to get to work. "It really messed it up," said Stan Roberts, an aerial traffic surveyor for radio station WMAL-AM. "Everyone was trying to get off the Beltway."

Roberts and radio station WTOP traffic watcher Bob Marbourg said the morning rush-hour was pushed back about an hour because of the bridge cutoff, which lasted from 5:22 a.m. to 7:07 a.m. Tie-ups were reported on I-295, South Capitol Street, Pennsylvania Avenue and other thoroughfares in the District's Southeast area. In Virginia, traffic was delayed on the George Washington Memorial Parkway, U.S. Rte. 1 and Telegraph Road. Indian Head Highway and Branch Avenue were among roadways backed up in Maryland.

The drawbridge failure occurred when a bridge operator unsuccessfully tried to open the bridge and allow a sailboat to pass.

The malfunction was tentatively attributed last night to a damaged electrical switch, and officials said they were taking steps to prevent further disruptions of rush-hour traffic. "We'll put more men on the bridge to make sure," said Daniel P. O'Donnell, a District of Columbia bridge engineer. "It's a problem that we want to correct, and we're going to put as many men out as necessary."

The incident set off a dispute, however, among District, Maryland and construction company officials about what led to the prolonged delay in reopening the drawbridge to traffic. "Until they determine what happened, the chances are that it may occur again," said Tom Crosby, an American Automobile Association spokesman. "It could be another disaster."

Edward H. Meehan, the acting Washington-area district engineer for the Maryland State Highway Administration, and Dick Dooley, manager of the bridge repair project for Cianbro Corp., a Pittsfield, Me., construction firm, contended that the bridge remained shut to traffic about an hour longer than necessary. They asserted that a D.C. employe, stationed at the drawbridge, failed to take adequate steps to reopen the bridge.

"The question I have was, 'Why wasn't there a quicker response from the D.C. operator?' " Meehan said. "That remains unanswered at this time." Dooley added, "If he'd done what should have been done, by 6 o'clock the bridge should have been opened to traffic."

D.C. officials countered, however, that the drawbridge operator, identified as George J. Clancey, could not properly close the bridge's abutting sections because they were out of alignment. O'Donnell blamed the misalignment on Cianbro's construction work. Cianbro and Maryland officials disputed this complaint. Clancey said he could not comment publicly on the incident.

Under current U.S. Coast Guard rules, the 175-foot drawbridge is not required to be opened for privately operated sailboats before 9 a.m. If the rules had been enforced, yesterday's incident would not have occurred, officials acknowledged. A Coast Guard spokesman said it was unclear whether there would be an investigation.

Most repair work on the bridge is being conducted at night to avoid traffic disruptions. Three of the six lanes may be closed to traffic between 8 p.m. and 6 a.m. from Sunday night to Friday morning. They also may be closed from 9:30 p.m. Friday to 7:30 a.m. Saturday and from 8 p.m. Saturday to 10:30 a.m. Sunday.