The former chief executive of American International Group Inc, Maurice Hank Greenberg, reached a deal to sell most of the shares he holds in the insurer to a unit of Swiss bank UBS.

Greenberg's investment vehicle, Starr International Co, entered into a so-called variable prepaid forward-sale agreement with UBS Securities LLC last week under which it will pocket $278.2 million upfront, according to a filing late Friday with the U.S. Securities and Exchange Commission.

In exchange, Starr will deliver a total of 10 million shares in four transactions of 2.5 million shares each. The first delivery is due in just under three years from now, with the remaining deliveries in each of the three months immediately after that.

The U.S. Internal Revenue Service said on its website that the up-front cash payments in such deals typically represent 75 to 85 percent of a stock's current fair market value.

The proceeds of the deal with UBS effectively come to $27.82 per share, a 20 percent discount compared with AIG's closing price on Friday of $34.80.

The structure is designed to shield the seller from volatility in the price of a stock.

In these deals, if the price of a company's stock falls during the period of the contract, the investment bank absorbs the loss. If it rises, the seller pockets the gains.

According to the filing, Starr is protected against shares falling below a floor price of $31.22. It will be eligible for extra cash if shares go up to a cap price of $46.83, beyond which UBS would receive the gain.

Greenberg currently owns about 14 million shares, or 10.4 percent of the company, according to Thomson Reuters data.

(Reporting by Phil Wahba, editing by Matthew Lewis)