Developer and racetrack owner Mark Vogel voluntarily placed his two Maryland racetracks under the control of a federal bankruptcy court yesterday, a last-minute move that averts a threatened foreclosure and allows the tracks to open as scheduled tonight, according to a top state official.

Secretary of Licensing and Regulation William A. Fogle Jr. said Vogel filed for reorganization under Chapter 11 of the federal bankruptcy law late yesterday in Baltimore to prevent a foreclosure by the First National Bank of Maryland, which holds a delinquent $11 million loan on Rosecroft Raceway in Oxon Hill and Delmarva Downs near Ocean City.

Although Fogle described the filing as "a cooperative effort" between Vogel and the bank, the action came after a day of tense negotiations in which the state took aggressive action to wrest control of the racetracks from Vogel, according to high-level state sources.

In a Wednesday afternoon meeting, Gov. William Donald Schaefer and other top officials decided they would not allow the tracks to open under Vogel's ownership after his admission of long-term "off and on" use of cocaine, the sources said. Vogel, 42, spoke about his drug use in an interview with The Washington Post.

If necessary, members of the State Racing Commission were prepared to deny an operating license to Vogel for Rosecroft, which is slated to open at 7:30 tonight with the first live races of the harness season.

Fogle, however, described the tracks' scheduled opening as "under control" after bankruptcy judge James Schneider signed an order placing the tracks under the control of a trustee, Jim Murphy, who has been serving as the tracks' general manager.

Fogle said the Racing Commission will issue a track operating license in Murphy's name today, allowing the Rosecroft opening to proceed as scheduled. Delmarva Downs also will open to simultaneously broadcast the Rosecroft events.

"It was mutually beneficial to get this thing worked out. A foreclosure would have closed the tracks and nobody gains there," Fogle said.

Paul Mark Sandler, an attorney for Vogel, said yesterday's action was "an amicable resolution of the dispute between the lender and Mr. Vogel."

"As a result, harness racing will be full go" for tonight, Sandler said. "What Mr. Vogel has done voluntarily is not to allow his personal problems with the bank to flow over into the racing industry."

The state's involvement in the discussions included a Wednesday afternoon meeting in which Schaefer, Attorney General J. Joseph Curran Jr., Fogle and two members of the State Racing Commission discussed Vogel's precarious finances with representatives from First National. The officials were concerned that a foreclosure could keep the tracks from opening and were anxious to work with the bank, according to officials involved in the talks.

At the meeting, state officials agreed that the "tracks could not open or should not open" under the ownership of Vogel's companies, according to a source.

Vogel could not be reached for a comment last night.

Vogel, a flamboyant Bowie-based developer who accumulated a $1 billion real estate empire in less than a decade, pleaded guilty in Fairfax County to a cocaine possession charge in November. But under a plea agreement, his sentencing was delayed for a year and his criminal record will be expunged if he commits no other offenses within that time.

The plea arrangement left the Racing Commission in a legal quandary this month as it prepared to consider renewal of Rosecroft's operating license, a prerequisite to opening the track.

Although commission members were concerned about Vogel's Sept. 13 arrest with four grams of cocaine in his possession, they believed the terms of his guilty plea prevented them from ousting him from the tracks. The commission has the power to suspend or revoke track licenses based on felony convictions. But some members felt Vogel's agreement with the courts prevented them from acting.

That sentiment changed, however, after Vogel admitted his long-term "off and on" use of cocaine in an interview published Sunday, members said.

They also were concerned about the foreclosure action filed by First National last week after Vogel, who had placed the tracks on the market soon after his arrest, said they were no longer for sale.

Vogel met Tuesday with bank officials to try to stall the foreclosure, but sources said those talks ended unsatisfactorily.

Staff writers Vinnie Perrone and Debbie M. Price contributed to this report.