Maryland Senate President Thomas V. Mike Miller Jr. (Linda Davidson/The Washington Post)

The Maryland Senate gave preliminary approval Tuesday to a bill that would allow bail for criminal defendants even if they cannot afford to pay, potentially undoing a recent decision by the state’s highest court and setting the stage for a battle with the more liberal House of Delegates and members of the state’s Legislative Black Caucus.

After a prolonged debate, the Senate voted to advance the measure despite objections from Attorney General Brian E. Frosh (D) and advocates who say the legislation will lead to more poor defendants remaining in jail because they can’t afford to post bond.

The Maryland Court of Appeals issued a rule change last month that required judges­ to impose the “least onerous” conditions when setting bail for a defendant who is not considered a danger or a flight risk.

Also Tuesday, after a short but lively debate, the Senate delayed action on another bill that is certain to lead to a showdown with Gov. Larry Hogan (R) over redistricting changes.

Democratic legislative leaders have backed a bill that would try to set up a Mid-Atlantic regional compact with New York, New Jersey, Pennsylvania, Virginia and North Carolina on redrawing congressional districts.

Maryland Senate President Thomas V. Mike Miller Jr. overseas a Senate session in 2016 in Annapolis. (Jonathan Newton/The Washington Post)

On Monday, a House committee voted against Hogan’s redistricting proposal, which would have created a non­partisan commission to determine the boundaries for the state’s congressional and legislative districts.

Sen. Craig J. Zucker (Montgomery), the lead sponsor of the Democratic bill, said redistricting is a national problem that has not been addressed on a federal level. The bill attempts to address it on a regional one, he said, adding: “This presents an opportunity for Maryland to take the lead.”

The bill is contingent on the other states enacting similar legislation and would become void if the compact is not created by 2032. It is an attempt to circumvent political opposition to the idea of lawmakers in a heavily Democratic state, like Maryland, giving up control over redistricting while lawmakers in neighboring, Republican-majority states are allowed to keep that power.

“Congressional redistricting is a national problem that deserves a national solution,” Senate President Thomas V. Mike Miller Jr. (D-Calvert) said. “However, when the federal government fails to lead, it is our responsibility to take the charge.”

U.S. House Minority Whip ­Steny H. Hoyer (D-Md.) said in an interview that he supports the concept of the bill being pushed by Democratic state lawmakers, calling it “a step in the right direction but not as far as it ought to go.”

Hoyer favors a bill pending in Congress that would institute a bipartisan redistricting commission in every state. An identical bill did not advance in the previous session and has yet to get a hearing this year.

“Now let me make it clear, I am a serial gerrymanderer,” Hoyer said. “As long as North Carolina, Pennsylvania, Ohio and Florida, Texas, other states that I could name, pursue partisan redistricting, there’s no reason to expect that those of us who are in Democratic states won’t do so as well. But what we ought to have is a national mandate that redistricting is to be done in a fair, balanced way through non­partisan commissions.”

State Senate Minority Leader J.B. Jennings (R-Baltimore County) called Zucker’s bill “a joke” and asked why Democrats are “kicking the can down the road until other states do something.”

“It’s our state. It’s our lines,” Jennings said. “Why can’t we just fix our problem right here in Maryland?”

A spokeswoman for the governor said the Democratic bill was a “political ploy designed to give the appearance of supporting redistricting reform while ensuring that it never actually happens.”

On the bail bill, the Senate rejected several amendments that would have kept the rule set by the Court of Appeals in place. The court issued the rule change after Frosh raised questions about whether the state’s use of cash bail was constitutional.

Sen. Robert A. Zirkin (D-Baltimore County) said the legislation, sponsored by Sen. C. Anthony Muse (D-Prince George’s), gives discretion back to individual judges, allowing them to issue bail when they think it is appropriate.

Frosh and members of the Legislative Black Caucus had been pushing the legislature not to take action on any bail legislation this year and let the court’s decision remain in place.

Last week, Del. Curtis S. Anderson (D-Baltimore), the House sponsor of the bail bill, withdrew his version of the Senate legislation after talking to court officials and deciding that lawmakers should wait and assess the impact of the rule change over the coming year.

In other action, the Senate gave initial approval to a bill that would prohibit school districts from suspending and expelling 4-year-olds. The measure would also limit other young students in kindergarten through second grade from receiving similar discipline.

Opponents of the bill argued that the measure will tie the hands of local districts; its supporters said young students should not be suspended or expelled unless they pose an “imminent threat.”

More than 2,200 students in that age group were suspended or expelled last year, many because they were disruptive or disrespectful.

Jenna Portnoy and Josh Hicks contributed to this report.