WEST WINDSOR — A traffic light on Route 1 did not work for 2½ hours during the peak period tonight, causing a lengthy traffic backup in both directions along the highway, police said.

The malfunctioning light is located at Route 1’s intersection with Washington Road in West Windsor and led police to direct traffic while they waited for a repair crew to show up, township police Lt. Pat McCormick said.

The light appears to have shorted out due to rain, McCormick said. This particular light has malfunctioned multiple times this year, he said.

Maintenance of the light is the state’s responsibility because it is on Route 1.