The country’s highest-ranking military officer will be the commencement speaker at Maine Maritime Academy’s graduation ceremony in May.

Gen. Joseph F. Dunford Jr., chairman of the Joint Chiefs of Staff, will speak at the academy’s commencement May 7 in Castine, according to a press release from the school.

“We are honored that General Dunford will deliver the send-off to the Class of 2016,” said William J. Brennan, the college president, in the release. “As our nation’s top military adviser and seasoned Marine Corps commander, General Dunford exemplifies service and leadership. Our students strive to embody both qualities in their careers and in their lives.”

Maine Maritime Academy offers 18 degree programs in engineering, management, science and transportation, and has about 950 undergraduate and graduate students. It has suffered two tragedies in this school year.

In October, five graduates died in the sinking of the cargo ship El Faro in a hurricane. The five were Michael Davidson, 53, of Windham, the captain; Michael Holland, 25, of Wilton; Danielle Randolph, 34, of Rockland; Dylan Meklin, 23, of Rockland; and Mitchell Kuflik of Brooklyn, New York.

In February, David Breunig, a Maine Maritime Academy junior from Westbrook, disappeared after a night with friends in Orono. He has not been found.