AUGUSTA, Maine — Legislative leaders took more flak from Gov. Paul LePage, but they prevailed in the first political staredown of 2017 late Friday when the governor reversed course to sign a bill delaying parts of Maine’s new marijuana legalization law until early next year.

A dispute over the bill ramped up quickly on Thursday, after the Legislature unanimously passed a moratorium on many provisions of the law passed by voters in November 2016.

On Friday night, LePage signed the law, issuing a Facebook statement that announced the signing and hammered House Speaker Sara Gideon, D-Freeport, for “dirty politics” and saying the first-term speaker will “have to work hard to earn my trust” during this year’s legislative session.

Friday night’s signature represented an about-face, after the governor emerged from his office on Thursday to tell reporters that he wouldn’t sign the bill unless lawmakers “fix it,” raising the stakes on the issue, since a drafting error in the law that was set to take effect on Monday would have allowed children to possess marijuana.

He wanted the Legislature to provide funding in the bill for his administration to begin writing rules and move enforcement of the law from the Department of Agriculture, Conservation and Forestry to the Bureau of Alcoholic Beverages and Lottery Operations.

But an amendment to do that from Rep. Brad Farrin, R-Norridgewock, was defeated with just one Democrat voting for it in the House. Many lawmakers said that the issue could be addressed later. On Thursday, Gideon introduced a similar bill. LePage’s statement said that he’d issue an executive order to do those two things.

The legislation that passed on Thursday will give lawmakers until February 2018 to approve rules for retail sale of marijuana and closes the loophole allowing marijuana possession by people younger than 21. Possession of up to 2.5 ounces will still be legal for those older than 21.

After LePage’s criticism, Gideon and Senate President Mike Thibodeau, R-Winterport, stood firm on the bill, with Thibodeau issuing a statement on Friday that said he hoped that “no one is injured” if LePage didn’t sign it.

“I know how challenging it will be, and there is more work ahead,” Gideon said in a Friday statement, “but we’re on the right path for a productive and dynamic session.”

Michael Shepherd joined the Bangor Daily News in 2015 after three years as a reporter at the Kennebec Journal. A Hallowell native who now lives in Augusta, he graduated from the University of Maine in...