IN THE BEGINNING it looked like the longest of shots, but on Tuesday Rep. Robert L. Ehrlich Jr. brought an end to more than three decades of Democratic control of Maryland's top office. He ran a surefooted campaign, and voters apparently warmed to his appealing life story and his promise to shake up what has become almost a one-party state. They also may have been showing their disapproval of Gov. Parris N. Glendening and his many missteps, which burdened the campaign of Lt. Gov. Kathleen Kennedy Townsend. Tuesday's news wasn't all bad for Maryland Democrats: In the 8th Congressional District an accomplished state senator, Christopher Van Hollen Jr., defeated moderate Republican Constance A. Morella, who for 16 years has ably represented Montgomery County in Congress. The results overall, including Mr. Ehrlich's decisive victory and the possible defeat of Democratic House Speaker Casper R. Taylor Jr., carried a clear message that Marylanders were ready for a change.

Now Mr. Ehrlich must fill in the details of a strategy for governing that he only sketched out during the campaign. The Republican candidate made the state's budget woes a major issue, promising to end the "cocktail party" of spending that he said had resulted from years of one-party control. But the framework he offered to close the looming $1.7 billion budget deficit falls far short. Mr. Glendening dug the budget hole deeper by deferring cuts until after the election. Now the governor-elect will have to make the hard choices that he has so far skipped over and demonstrate his promised ability to work with the still-Democratic General Assembly.

Mr. Ehrlich wants to legalize slot machines, from which he predicts huge revenue for the state. We think legalization is a mistake; but even if Maryland goes ahead, revenue from slots can't possibly close the budget gap. Hard choices will be required. Making -- and selling -- them may end up an even tougher political challenge than the historic one Mr. Ehrlich has just overcome.