The inferred portfolio valuation was put at $269m but the proposed sale price was put at $132m. The net proceeds after tax and other costs were put at around $126m.
Initial rent is to be $15m.
The deal is expected to be completed by the end of October, subject to conditions being met.
Ampol plans to use the proceeds for what it called 'general corporate purposes'.
Z energy will maintain control of the sites and lease them all back to the entity.
In March, the Herald reported how the Commerce Commission had granted clearance to Ampol to buy NZX-listed Z Energy.
The offer valued Z Energy at $2 billion.
Clearance is subject to an undertaking from Ampol to sell Gull, the country's third-biggest fuels company. Ampol said it would sell Gull to Australian investment firm Allegro for $572m.
Shareholders in Z Energy voted in favour of the Ampol deal.
The scheme of arrangement was passed by the required majority of shareholders – 75 per cent or more of the votes cast and more than 50 per cent of the total number of Z Energy shares on issue.
The sale also had the support of the Z Energy board.
New Zealand has more than 200 Z Energy service stations.