By the slimmest of margins, members of the Maryland Senate yesterday defeated a bill that would have halted executions in the state to allow further study of racial and geographic disparities in capital punishment.

The moratorium failed with 23 senators voting for it and 24 voting against it. Senate President Thomas V. Mike Miller cast the deciding vote, as he had promised.

Two weeks ago, during a procedural vote, Miller sided with the bill's supporters, but he has said since that he would vote against it when it mattered. Because Gov. Robert L. Ehrlich Jr. has said he would veto the bill, Miller called passage "an exercise in futility."

Sen. Sharon M. Grosfeld, who was out last week recovering from breast cancer treatments, spoke passionately in favor of the moratorium, hoping she might sway one of her colleagues to take what she saw as a fairly harmless stance -- to stop executions temporarily until the well-documented problems with the system can be remedied.

The moratorium would have lasted until 2005.

"We should all be supporting [this bill] regardless of what side we are on with regards to the death penalty and whether or not the death penalty should be repealed," said Grosfeld, a Montgomery County Democrat. "This legislation is not about repealing the death penalty. This legislation is about justice."

Had it passed, the legislation was expected to clear the House of Delegates, which has supported a moratorium in the past. Now, the bill is over for this year.

All 14 of the Senate's Republicans voted against the bill and all of the African-American members of the Senate voted to approve the moratorium, which was the top priority of the Legislative Black Caucus.

The defeat occurs two months after the release of a state-sponsored University of Maryland study that showed racial and geographic disparities in Maryland's death penalty. While awaiting the study's results, Gov. Parris N. Glendening instituted a moratorium, which Ehrlich reversed when he entered office in January.

The report found that blacks who kill whites are 2 1/2 times more likely to be sentenced to death than are whites who kill whites and 3 1/2 times more likely to be executed than blacks who kill blacks.

The study also found that jurisdiction matters a great deal in Maryland.

The likelihood that prosecutors will seek capital murder charges in Baltimore County is 13 times greater than in Baltimore, even when other factors such as the circumstances of the crime and a county's racial makeup are taken into account, the study found.

There are 12 men on death row in the state. Only three people have been executed in Maryland since 1976.

Sen. Ralph M. Hughes, the bill's sponsor, said he was disappointed with the outcome. He thought he might have changed a few minds during the past two weeks, when the vote was delayed six times.

"I was hoping we would get that one other vote that we needed," the Baltimore Democrat said.

Fred Romano, whose sister Dawn Marie Garvin was raped and murdered 15 years ago in her White Marsh apartment, watched the vote from the gallery. His sister's killer, Steven Oken, would have been executed yesterday if not for his latest court appeal.

"This is another step toward justice, not just for Dawn, not just for me, but for all of Maryland," Romano said after the vote.