The Maryland General Assembly pushed hundreds of bills across the finish line Monday, concluding its 437th session by passing legislation that would make the state’s attorney general the first in the country with power to sue drug companies for price gouging.

Lawmakers voted to bar colleges from asking about a prospective student’s criminal history in an initial application. They also passed legislation that would let beekeepers shoot bears that attack hives, limit how much students can be tested each year, forbid poultry companies from routinely treating chickens with antibiotics, and devote more resources to addressing the escalating heroin epidemic.

They failed, however, to approve an expansion of the state’s nascent medical marijuana industry. Negotiators agreed Maryland needs more minority-owned medical marijuana firms; they could not agree on the details.

By Monday, the annual 90 days of lawmaking had already produced a few big policy accomplishments, banning the controversial natural gas extraction technique known as fracking and approving a bill that would give five paid sick days to most Maryland workers.

Legislators also agreed to provide Baltimore’s school system with extra funding to help close a $130 million gap. And they approved legislation pushed by Mayor Catherine Pugh to give her the sole power to appoint the city school board, authority she currently shares with the governor.

The session also sent a clear message by opposing Trump administration policies and granting Republican Gov. Larry Hogan a series of small legislative victories.

The Democrat-controlled General Assembly passed nearly a dozen measures in response to Republican President Donald J. Trump’s policies or plans, including empowering the attorney general to sue the federal government and repealing five longstanding calls for a federal constitutional convention. But with a midnight deadline approaching and lawmakers racing to reach deals on some of the 2,681 bills introduced this year, the last two initiatives related to federal politics faltered.

Legislation known as the “Trust Act” that once would have forbid local police from cooperating with federal immigration authorities was diluted so much that liberal lawmakers no longer supported it. And a last-minute bill would have put into state law federal internet privacy regulations that Trump recently stopped from going into effect. But a key House of Delegates committee chairman said that issue was too complicated to force into the final hours of the legislative session.

“To try to do this on the fly, it just doesn’t work for me,” said Economic Matters Chairman Dereck Davis, a Prince George’s County Democrat. “I can do things expeditiously, but this I cannot do.”

Bills passed by the legislature go to the governor to be signed or vetoed. He can also allow bills to become law without his signature — a step he took earlier in the session when the legislature passed the nation’s first law to protect Planned Parenthood from federal budget cuts.

Late Monday, lawmakers approved one of the governor’s top initiatives, passing a bill that would grant tax breaks to manufacturing firms that bring new jobs to areas with high unemployment, including Baltimore, Western Maryland and the Eastern Shore.

The governor had told reporters he was optimistic about the bill’s chances and celebrated the 2017 session as the most bipartisan and successful of his three years in office.

“I’m not sure how it could have been any better,” Hogan told reporters. “We had a few heated moments here and there on some different topics and some rhetoric, but the reality was we worked across the aisle and got things done.”

Two of Hogan’s Cabinet secretaries went unconfirmed by the Senate this year, and the legislature roundly rejected his plans to let an independent commission — rather than politicians — draw legislative boundaries. The governor vetoed a bill that would have limited how the state can intervene to help failing schools, and the General Assembly swiftly overrode him.

Several of the governor’s initiatives were watered down or changed completely, but he still counted them among his legislative wins, including the first rewrite of the state’s ethics laws in 15 years and a new grant program for environmental cleanup projects.

The governor secured modest new tax breaks for retirees and law enforcement, and the legislators delayed implementation of a law that Hogan said jeopardized all major transportation projects.

While Hogan signed the fracking ban, it is unclear whether the governor will approve the Assembly’s mandatory paid sick-leave bill. The governor had previously called the measure “dead on arrival,” but Hogan would not say Monday whether he planned to veto it. He told reporters he would consider it when it reached his desk.

Separately, a bill that would have banned guns on college campuses, where they already are not allowed, was tripped up by disagreement over whether knowingly breaking that law should be a civil or criminal offense.

It was perhaps the most significant gun-control proposal taken up this year, and appeared to die after one of the four Democrats on a committee hammering out a compromise refused to let the infraction be a crime. Baltimore County Democratic Sen. Jim Brochin, who is weighing a run for county executive, said there was no way he could support a criminal penalty.

“They would hang me,” Brochin said of some of his constituents. “There’s nothing I can do.”

Lawmakers thought the Maryland Medical Cannabis Commission should issue at least five additional marijuana growing licenses, bringing the statewide total to at least 20. But senators and delegates disagreed about whether the commission should promise lucrative licenses to two companies currently suing the state because they were bumped out of the pool of top applicants.

With less than three minutes before session ended for the year, the House made a motion to relent and grant the company licenses. Republicans mounted a filibuster, and time expired without a vote.

Despite disagreement on a few key issues, convivial lawmakers spent much of the day laughing and joking, dressed in seersucker or patriotic-themed suits. Republican Del. William Folden of Frederick County and Democratic Del. C.T. Wilson of Charles County showed up in matching red-white-and-blue bow ties, suspenders and jackets that featured elephants for Folden and donkeys for Wilson.

The day began with lobbyists lining the entryway to the State House, the way they do every day, making one more push for their interests.

Passing them, House Speaker Michael E. Busch quipped to reporters, “You know the difference between a lobbyist and puppy standing outside your door? When you let the puppy in, it stops crying.”

As lawmakers rushed from the chamber floors to committee voting sessions and back again, they broke briefly to observe the first night of Passover. The Baltimore Jewish Council organized a seder for those in Annapolis who couldn’t make it home to their families to celebrate the holiday, which commemorates the Israelites’ exodus from slavery in Egypt. The House and Senate planned their floor sessions around the seder so lawmakers could participate.

“It’s very special in the middle of a stressful time to disengage and gather to observe a holiday that celebrates freedom,” said Sen. Cheryl Kagan, a Montgomery County Democrat.

Baltimore Sun reporters Michael Dresser, Ian Duncan and Pamela Wood contributed to this article.

ecox@baltsun.com

twitter.com/ErinatTheSun