ALBANY – New York’s highest court is expected to decide by the Fourth of July whether municipalities can use local zoning laws to ban shale gas development using hydraulic fracturing within their borders.

The seven-member Court of Appeals heard oral arguments Tuesday in two cases where a midlevel appellate court unanimously concluded last year that state oil and gas law doesn’t trump the authority of local governments to control land use.

The challenges have been closely watched by an industry hoping to drill in New York’s piece of the Marcellus Shale formation and by environmentalists who fear that drilling could threaten water supplies and public health.

The cases being argued before the Court of Appeals involve bans in the small towns of Dryden and Middlefield in rural Central New York.

The Dryden ban is being challenged by a trustee for Norse Energy, an Oslo, Norway-based company that went bankrupt after amassing thousands of leases on New York land it was never able to develop. The Middlefield ban is being challenged by Cooperstown Holstein, a dairy farm that had leased land for drilling.

The judges questioned both sides aggressively, asking lawyers supporting the bans what was unclear about the 1981 state law that says the state has sole authority to regulate oil and gas development.

When Scott R. Kurkoski, representing Cooperstown Holstein, said the state law was intended to put energy development above “not-in-my-backyard” interests, Chief Judge Jonathan Lippman said he understands that. But he added, “There’s a flip side to that argument, which is, don’t bulldoze over the voice of the people in individual municipalities who want to be heard about how they live their lives.”

Supporters of municipal authority to restrict hydraulic fracturing said Tuesday that more than 170 towns have passed a ban or a moratorium. About 40 other New York towns have passed resolutions supporting gas development.

Even if the bans are overturned, the industry and landowners eager to profit from gas drilling still face a statewide moratorium in effect since July 2008, when the Department of Environmental Conservation launched an environmental impact review of shale gas development.

Gov. Andrew M. Cuomo has said he won’t decide whether to lift the ban until a health-impact review launched in 2012 is completed. There is no timetable for completion of that review.