ALBANY, N.Y. (AP) _ The state Senate ended a special session Thursday, ignoring a midnight deadline to enact legislation on an agreement for the state to buy and dismantle the Shoreham nuclear power plant.

Gov. Mario Cuomo has maintained that the Long Island Lighting Co. plant should not be allowed to open because Long Island couldn't be safely evacuated in the event of a serious nuclear accident.

Long Island residents were concerned that their electrical rates might soar under the state plan.

State Assembly members headed home before the Senate's adjournment, apparently convinced that the upper chamber would refuse to deal with the Shoreham agreement.

The leader of the Democratic-controlled Assembly, Speaker Mel Miller, said his members wouldn't approve any Shoreham bill that the Senate hadn't agreed to.

The Senate wouldn't back a Shoreham measure because nine senators from Long Island, all Republicans, felt the agreement as written would be too generous to LILCO and raise rates for the utility's customers.

The takeover of the completed power plant was approved by stockholders of Long Island Lighting, better known as LILCO, and the utility's board set a deadline for state approval in the middle of November. When that date passed, it was extended to Dec. 1.

LILCO spokesman James Lois said the utility's board of directors had called a meeting for Friday in Hicksville to discuss ''our future course regarding the settlement.'' He would not speculate what options LILCO might consider.

Cuomo had said that if the deal died, Shoreham could get an operating license from the federal Nuclear Regulatory Commission as early as Dec. 12.

The deal, worked out by LILCO and Cuomo's aides in June, called for the state to buy the $5.3 billion power plant for $1 and dismantle it. In return, the utility would get guaranteed rate hikes over the next decade totaling more than 60 percent.

Cuomo said LILCO customers would find their rates going up by 100 percent over the next decade if the agreement wasn't approved and the Shoreham plant went into operation.

The state, through the New York Power Authority, would build non-nuclear power plants to provide LILCO with the electricity it would lose without Shoreham, the deal stipulated.