A company part-owned by Australian mining magnate Gina Rinehart has failed to have the Victorian government’s fracking ban overturned or to be awarded $2.7bn in damages.

Between 2002 and 2013 two subsidiaries of Lakes Oil, of which Rinehart is the second-largest shareholder, obtained four exploration permits and two retention leases under Victoria’s Petroleum Act 1998. A retention lease grants the right to any petroleum discovered during the permit period.

Some of the petroleum exploration intended by the Lakes Oil involved hydraulic fracking, a technique used to extract unconventional gas found in coal seams, shales and tight sandstones. The companies also planned to explore for conventional gas.

In August 2012 the Victorian government announced a moratorium on hydraulic fracking with immediate effect, and this was implemented through government policy rather than through changes to the Petroleum Act. But in 2014 the government widened the moratorium to include conventional onshore exploration, and in 2017 amended the Petroleum Act to enforce the ban to 2020.

Lakes Oil argued that the fracking ban did not prevent its subsidiaries from carrying out minimum work requirements to prepare for fracking once the moratorium was lifted. The permits applied to sites in south-western Victoria and Gippsland. Lakes Oil also argued the government’s moratorium before the 2017 legislative change was unlawful. The government should not have pre-emptively refused to consider or accept operation plans for petroleum gas exploration from Lakes Oil before the legislation had taken effect, the company argued.

In its 2017 Annual Report, Lakes Oil asserted that the then resources minister was “with one hand, granting exclusive rights and obligations to carry out exploration operations but, with his other hand, taking away the means of doing so”. The damages Lakes Oil sought included $92m in past expenditure at the sites and $2.6bn of lost future earnings.

But on Friday afternoon in Victoria’s supreme court Justice Cameron Macaulay rejected Lakes Oil’s claims. He found the legislation banned all petroleum exploration work, including preparatory work.

Cameron said that determining whether or not the implementation of the moratorium before the March 2017 legislation change was lawful would have no real consequence and, for that reason, dismissed that aspect of the claim.

After the March 2017 legislative changes, the resources minister varied Lakes Oil’s six permits and leases to clarify that petroleum exploration was not permitted during the statutory moratorium period. Macaulay found those variations were not validly made, but said this was of little practical consequence considering his decision regarding the meaning and effect of the changes made under the Petroleum Act.

The decision follows a two-day hearing in March.

Zianna Fuad, an organiser from the not-for-profit environmental organisation Friends of the Earth, said taxpayers should not have to “pay the price for failed business decisions”.

“Victorian communities fought tirelessly for more than five years to secure Australia’s first permanent ban on fracking,” Fuad said. “It is completely absurd that Lake’s Oil, who invested in this risky industry, has disregarded the democratic decision taken by the Victorian government to protect land, water and climate from invasive drilling.

“Lakes Oil has been fully aware of community opposition for at least half a decade, yet continued to invest in the development of onshore gas despite losing its social license to operate in Gippsland.”