People who want to ban hydraulic fracturing for natural gas in Maryland rally outside the statehouse and governor's residence in Annapolis, Maryland, on Thursday, March 2, 2017. (Brian Witte/AP)

A Maryland bill that bans hydraulic fracturing cleared its final hurdle Monday night when the Senate approved the measure with a 35-to-10 vote.

The legislation now heads to Gov. Larry Hogan’s desk, who has pledged to sign it.

Maryland will become the third state in the country to prohibit hydraulic fracturing, also known as fracking.

New York and Vermont are the other states that have banned fracking, with an executive order and with legislation, respectively. Maryland is the first state with gas reserves to pass a ban through legislative action.

Anti-fracking activists from Western Maryland cheered as the tally was taken.

ANNAPOLIS, MD — MARCH 22: Maryland Senate President Thomas V. “Mike” Miller, Jr. leads the Senate session on March 22, 2016 in Annapolis, MD. (Jonathan Newton / The Washington Post) (Jonathan Newton/The Washington Post)

“This vote confirms the power of participant democracy,” Ann Bristow, a resident of Garrett County and a member of a state commission that studied fracking. “Never believe when someone tells you that an organized movement can’t produce change against overwhelming odds. We are proving otherwise.”

Sen. George C. Edwards (R-Garrett), who voted against the measure, offered an amendment for the state to continue a moratorium until 2027. The amendment was rejected.

Fracking, which has the greatest potential in Garrett and Allegany counties, involves injecting water, sand and chemicals deep into the ground at high pressure to break up rock and release natural gas. Advocates say the practice provides a cleaner energy source than coal, but opponents have raised concerns about the potential for water contamination, greenhouse-gas emissions and earthquakes.

After a nearly 90-minute debate, the Senate gave preliminary approval to a controversial bill that would limit the power of the State Board of Education in how to turn around low-performing neighborhood schools and would set up an accountability system for rating schools. Hogan (R) has threatened to veto the measure.

Sen. Paul Pinsky (D-Prince George’s), vice chairman of the Senate Education, Health and Environment Committee, said the legislation, which is in response to the federal Every Student Succeeds Act, provides a “strategic framework” for the state board.

Pinsky offered an amendment, which was approved, to increase the rate of academic indicators (standardized testing, student achievement, student growth and graduation) to 65 percent of the school’s accountability rating. The original bill had the limit at 55 percent.

Republicans who oppose the bill said that even at 65 percent, the state would still rank below states that rate 75 percent and higher.

Pinsky said the legislation sends a strong message to the State Board of Education that the General Assembly does not want low-performing schools turned into charter schools.

The Senate also gave initial approval to a watered-down version of a bill that would have prohibited public and private colleges and universities from including questions about criminal history on their applications.

Under the measure that passed the House earlier this month, Maryland would have become the first state in the country to require colleges and universities to remove the question from their applications.

Instead, the Senate bill calls on colleges and universities not to use the information against an applicant in the admissions process.

Caryn York Aslan, director of policy and strategic partnership for the Job Opportunities Task Force, said advocates will work with the Senate to bring the bill closer to the stronger House version.

“The question is a deterrent,” York Aslan said.

At one point in the evening, several lawmakers in the Legislative Black Caucus left their respective chambers to huddle about a bill that has stalled in the Senate and is supposed to address problems with the state’s nascent medical marijuana program.

An advocate who attended a meeting of the caucus earlier in the day described the decision to leave the chambers as a protest of inaction on the issue. But others — including an aide to Senate President Thomas V. Mike Miller Jr. (D-Calvert), and Sen. Joan Carter Conway (D-Baltimore), a member of the caucus — said it was simply a chance for the lawmakers to discuss the bill.

Also on Monday night, the House gave final approval to a bill that would create a commission to oversee safety of the Washington Metropolitan Area Transit Authority’s rail system, a move the Federal Transit Administration required for the release of at least $2.8 million the agency plans to withhold this year until the panel is established. The measure will move to the governor’s desk for his signature.

The House also passed legislation that would set up a commission to monitor potential federal changes to the Affordable Care Act and recommend actions to protect access to health-insurance coverage, a response to concerns that the Trump administration and Republican-controlled Congress might repeal the health-care law.

The Senate passed the bill a week ago, but the two chambers must reconcile differences between their latest versions of the measure before it could receive final approval.