AUGUSTA, Maine — Maine lawmakers worked through the night and into the early hours Thursday morning as they tried to get some final high-stakes bills passed before the end of the legislative session.

Scott Ogden of Governor Mills office said Mills signed 78 bills into law Wednesday night and early Thursday morning.

The House and Senate adjourned around 6:45 a.m. after passing a number of bills, including legalizing sports betting, prohibiting driving while holding a cell phone, establishing presidential primaries and improving lead testing for Maine children.

Legislative leaders had originally planned to wrap up the session Wednesday.

A bond package to bring millions in funding for infrastructure improvements to Maine's highways and broadband network failed in the House. 

The bond package, championed by Gov. Janet Mills, also aimed to borrow $19 million to provide technical training and increase access to child care services for Maine's workforce. 

RELATED: Maine Legislature works to wrap up remaining votes

Mills hoped lawmakers would be able to get the $239 million package on the ballot for voters to approve in November.

Republican leadership in the House expressed disappointment in Democrats for refusing to separate the package into individual proposals.

Republicans say they would have agreed to pass a $105 million transportation infrastructure plan.

“House Republicans are concerned with increasing debt by $239 million after we just approved an $8 billion budget that spends 99.995% of all available monies,” House Republican Leader Kathleen Dillingham said in a statement.

Meanwhile, Mills worked into the night signing several bills, including an alternative to a controversial red flag bill and a measure to make biased-based and racial profiling by police illegal.

The profiling measure prohibits stops, detentions, searches or seizures on the basis of gender, race or sexual orientation. 

“We must prohibit profiling in order to maintain the confidence of Maine communities in our state and local law enforcement,” said bill sponsor Democratic Rep. Craig Hickman.

The law also requires the Attorney General's Office to come up with a complaint process for those who experience profiling.

RELATED: 'Red Flag' bill signed into law means stricter gun control in Maine

A controversial red flag bill also got the governor's signature after she worked with lawmakers to find a compromise on its wording.

The alternative bill, LD 1811, takes advantage of existing law that allows police to take people in mental health crisis into protective custody if they pose a danger to themselves or others.

Those people would be evaluated by a mental health professional, and if they're found to pose a threat and own dangerous weapons, those weapons could be taken away for 14 days. 

Similar bills have faced fierce opposition from gun advocates over the last two years. 

Gov. Mills also signed LD 1713 to provide property tax relief payments directly to Maine residents.

Mills is expected to sign legislation that would make it illegal for someone to use a handheld electronic device behind the wheel.

If the bill becomes law, Maine would join 38 other "hands-free" states in the county.

RELATED: Legislature passes bill requiring drivers to use hands-free phones

Mills is also likely to put her stamp of approval on LD 1116, An Act To Strengthen the Lead Poisoning Control Act, which passed the Senate unanimously. 

If signed into law, it would aim to reduce lead poisoning rates by requiring lead testing for all one- and two-year-olds in Maine regardless of income. Current law only requires those on MaineCare to be tested.

“Testing kids early for lead poisoning can help communities and families catch and mitigate any problems that might exist,” bill sponsor Democratic Sen. Nate Libby said in a statement. “I’m glad this measure to protect our kids has received such strong support.”

The session did not end without some drama, including when a Republican lawmaker yelled at House Speaker Sara Gideon, calling her a "weasel."

Rep. Sheldon Hanington was angered, saying lawmakers were not doing enough for veterans.

He was reportedly escorted out of the chamber.

Mills already signed the legislature-approved $8 billion two-year state budget.

The Maine Legislature will reconvene in January 2020.