David Swensen, the longtime investing chief at Yale University, got $4.7 million in compensation in 2017, making him the highest paid at the Ivy League school.

Swensen received a base salary of $843,954 and a performance bonus of $2.9 million as well as retirement and other deferred compensation of $290,080, according to a tax filing released Thursday. His pay was almost unchanged from the year prior.

Dean Takahashi, the university’s senior director of investments, was second, earning $3.5 million. Peter Salovey, Yale’s president, got $1.7 million. Yale has the third-largest college endowment in the U.S. at $29.4 billion, according to data compiled by Bloomberg.

A spokesman for Yale declined to comment on the filing.

Wealthier schools in the U.S. have made their investment chiefs the highest paid executives as they’ve grown more dependent on market gains to help offset the cost of education. While Swensen, 65, has led Yale’s investment office since the 1980s and produced one of the best performances in higher education, his pay has often trailed peers. Yale has posted a return of 11.6% in the five years through June 2018, the second-best gain in the Ivy League.

Narv Narvekar, the head of Harvard University’s endowment, collected $9.3 million in 2017, which included $2.75 million to reimburse him for pay when he agreed to leave his prior job, the Ivy League school said in a press release last week. Harvard’s tax filing showed he got $13 million, but the school said the amount was inflated by Internal Revenue Service accounting rules that required it to include a portion of future contractual obligations.

This article was provided by Bloomberg News.