After 40 years with the company, Booz Allen’s chief executive, Ralph Shrader, is set to retire at the end of 2014. (Jeffrey MacMillan/The Washington Post)

Ralph Shrader, the longtime chief executive of government contractor Booz Allen Hamilton, is retiring after 40 years with the company, it was announced Monday.

His successor, Horacio Rozanski, the company’s president and chief operating officer, will take over in January 2015. Shrader will continue to serve as chairman of Booz Allen’s board of directors.

During his 15-year tenure as CEO, Shrader led Booz Allen through some of its biggest challenges — the 2008 division of the company into two arms, its move to become publicly traded in 2010 and the aftermath of former employee Edward Snowden’s revelations about mass government surveillance.

In the uncertain world of government contracting, Shrader’s leadership style has been termed “consistent” by industry observers.

Rozanski, who will serve as a member of the board effective immediately, is also a longtime Booz Allen employee. Since joining the company in 1992, he has served as vice president and chief personnel officer before becoming president.

During the past two years, Rozanski has outlined the company’s growth strategy to deal with a decline in the defense budget, which includes a stronger focus on commercial and global markets.

“Horacio has gained the respect of management and staff at all levels, and of the Board and investment community,” Shrader said in a statement. “I strongly endorse his selection as Booz Allen’s next chief executive.”

The company’s share price closed up 0.7 percent, at $21.11.