Mayor Giuliani yesterday vowed to take Con Ed to court for plunging northern Manhattan into darkness for nearly 20 harrowing hours in this week’s fatal heat wave – which ended yesterday as temperatures dropped to the more seasonable 80s.

“I think the City of New York is entitled to a more secure flow of electrical power than Con Edison is giving us,” Giuliani said at the intersection of Amsterdam Avenue and 188th Street.

“You can’t have too many nights like the night we had last night and not expect that you’re going to kill people.”

All of Manhattan north of 155th Street lost power at 10:12 p.m. Tuesday when six high-voltage cables burned out because of heavy demand.

Con Ed said it had 95 percent of the 68,000 affected homes and businesses of Inwood and Washington Heights back on line at about 6 p.m. yesterday, with full restoration expected late last night.

Some East Village residents also lost power or had reduced voltage yesterday morning when an underground fire swept through a Transit Authority substation at Stanton and Essex streets.

While no one died as a result of the blackout, the heat wave claimed at least 10 lives, officials said.

The chief medical examiner’s office reported that the victims ranged from a 27-year-old man to a 90-year-old woman. The fatalities, which began Saturday, were caused by hypothermia or “exposure to environmental heat.” Seven of the dead expired in hospitals, two in men’s shelters, and one victim was found in an apartment.

Saying the Washington Heights blackout must never be repeated, Giuliani and Corporation Counsel Michael Hess outlined five possible legal avenues the city could pursue against Con Ed:

*Sue the company for damages, asking reimbursement for 500 additional cops and 200 emergency workers stationed in northern Manhattan.

*Sue on behalf of all the citizens and businesses who lost revenues or goods.

*Get a judge to issue a preliminary injunction requiring Con Ed to strengthen its power grid to prevent future blackouts.

*Get a court-appointed monitor of Con Ed to ensure that the company is better prepared for days of heavy demand.

*Sue Con Ed on the grounds of consumer fraud, saying the company did not deliver promised goods to thousands of paying customers.

Giuliani also said he would create a six-member task force to improve the utility’s preparedness.

“The purpose of the task force and the lawsuit will be to try to help them to come up with better ideas so that we don’t have to go through this again,” he said.

“It would seem to me that over the years they would develop more of a fail-safe system.”

After the city was entirely blacked out in 1977, then-Mayor Abe Beame created a task force that later largely blamed Con Ed for the electrical failure.

Giuliani lavished praise on the residents of upper Manhattan for being relatively peaceful Tuesday night, noting there were just nine blackout-related arrests and only a handful of lootings.

In a tour of Washington Heights with City Council Speaker Peter Vallone yesterday, Con Ed president Michael Evans got into a heated exchange with one woman.

“If this was Madison Avenue, this would have been taken care of by now!” yelled Alexandra Arguedas, a 30-year-old investment banker.

Evans noted that his home – in suburban Rye – was also blacked out.

He ducked all questions about the mayor’s threats to sue, repeating several times his company was doing all it could to restore power.

“We’ve never seen electrical loads like this in the history of our company and we’ve never seen heat like this in our city,” he told reporters.