Two weeks after Manhattan's West Side was plunged into darkness, Con Edison has discovered the cause of the outage.

In a statement, the utility said, "As part of our investigation, we reviewed 15 years of operating data and took equipment out of service at our 65th Street substation to conduct diagnostic testing, which allowed us to simulate the event. We identified a flawed connection between some of the sensors and protective relays at the substation. We have corrected that condition."

Relays are used to trigger circuit breakers in electrical substations, if there's too much current, and help the system from being overloaded.

The July 13th blackout started just after 6:45 p.m., running from 30th Street to 72nd Street and from Fifth Avenue to the Hudson River. Civilians jumped in to direct traffic as stoplights failed; hundreds of people were stuck in elevators; commuters were stuck in subway cars; restaurants and bodegas handed out food; and Broadway shows and other concerts were canceled . Here's the 21-minute video about the blackout from the point of view of Jennifer Lopez and Alex Rodriguez that you didn't realize you wanted to see:

Con Edison restored power by midnight, and, a few days later, said that the 13,000-volt feeder cable that shorted out on 64th Street and West End Avenue, which they thought was unrelated to the bigger blackout, was actually related to the bigger blackout.

Now Con Ed says they've "conducted extensive testing of equipment and a thorough review into why our relay protection system did not perform as designed. Our engineers have determined the root cause and taken steps to prevent a recurrence... Out of an abundance of caution, we have taken preventive measures by isolating similar relay equipment at other substations. We will analyze and test the equipment before we put it back in service. Our electrical delivery system continues to operate with multiple layers of relay protection."

A spokesperson told WNYC that the error probably happened during installation 11 years ago.

In the statement, Con Ed added, "The New York City grid is one of the most complex and technologically advanced in the world, with multiple layers of redundancy. In electrical systems, a relay detects abnormal conditions on the electrical delivery system and instantly sends signals to circuit breakers to open and isolate the problem. We are confident that we have identified the cause of the July 13th outage, and taken the corrective actions necessary to provide safe, reliable service for our customers."

After the July 13th West Side blackout as well as the July 21st incident where they deliberately cut power to parts of Brooklyn, there's been renewed scrutiny of whether Con Ed should control much of the city's power grid, and the prospect of yanking their license have been raised.

Governor Andrew Cuomo said last week on Alan Chartock's WAMC radio show, "The franchise is not granted by God. It's granted by the people of the city. You can change a utility company if they don't perform."

Reporting by Andy Mai