Apple CEO Tim Cook sold $36 million worth of company stock this week, according to a securities filing on Friday.
The sale came as Cook just passed his fifth anniversary running the company, lifting the restrictions on 1.26 million shares of stock he’d been awarded earlier.
Apple withheld more than 656,000 shares to meet tax withholding requirements, while Cook chose to sell 334,000 shares on the open market this week, garnering almost $36 million, according to the filing with the Securities and Exchange Commission.
Including some prior Apple stock holdings, Cook was left with 1.31 million shares worth about $140 million at Friday’s closing price. Cook also could collect another 3.5 million shares that remain under restrictions in coming years.
The share award was based in part on how well Apple’s stock did relative to the Standard & Poor’s 500 Index over the past three years. That has generated some controversy from compensation experts, who argued that the simple measurement may not have accurately reflected Cook’s performance as CEO. Of the 1.26 million shares awarded, 280,000 were dependent on the performance measurement.
Get Data Sheet, Fortune’s technology newsletter.
Apple’s total return adjusted for stock splits and dividends for the three years was 68%. Since that was in the top one-third of all S&P 500 stocks, Cook was awarded the maximum portion of shares allocated based on performance, or 280,000 shares. Had Apple’s return fallen in the middle one-third of companies, Cook would have received 140,000 shares. And if Apple (AAPL) had finished in the bottom one-third, Cook would not have received any of the performance-linked shares.
The shares Cook sold hit the market on Thursday and Friday at prices that ranged from a low of $106.54 to a high of $107.92, according to the filing.
Cook benefitted from a recent run up in Apple’s share price, which had been stuck below $100 for several months in the spring and early summer. But the shares have rallied 11% since Apple reported upbeat quarterly results on July 26.
The timing of the sales was predetermined under what is known as a 10b5-1 plan, named after an SEC regulation that allows company insiders to avoid insider trading charges by setting up a schedule of sales in advance. Even if Apple had suffered from bad news this week causing its share price to fall, Cook still would have sold his shares under the 10b5-1 plan.
Cook has sold Apple shares at regular intervals in the past, including in 2010, 2011, 2012, and 2014.