Donald E. Graham, the longtime Washington publisher who engineered the sale of The Washington Post and formed a holding company to run a diverse collection of businesses, is stepping down as chief executive.

Graham is retiring as CEO of Graham Holdings and will be succeeded by Timothy O’Shaughnessy, the company’s president and his son-in-law, effective immediately, the firm announced Thursday.

Graham, 70, will remain as chairman of Graham Holdings’ board of directors. O’Shaughnessy, 33, will add chief executive to his current responsibilities as president.

Graham’s decision brings to a close a four-decade career as an active manager in his family’s business, at one time among the highest-profile media companies in the United States. He rose from reporter to publisher of The Washington Post. He had held the title of chairman and chief executive, first at The Post and then at Graham Holdings, since 1991, succeeding his late mother, Katharine Graham.

“Tim O’Shaughnessy will be an outstanding CEO,” Graham said in a statement accompanying the announcement. “He has good ideas and he can execute. With the help of a remarkable board, the company is poised to take advantage of an unusual range of opportunities.”

Arlington, Va.-based Graham Holdings was created after Graham sold The Post to Amazon.com founder and chief executive Jeffrey P. Bezos in 2013. The newspaper, once highly profitable, had lost subscribers and revenue with the rise of digital businesses.

Most of the remaining assets of The Washington Post empire — the television stations, cable TV, and education company Kaplan — became the core of Graham Holdings, a publicly traded company closely held by the Graham family.

Graham Holdings’ other parts are a mix of old and new, including online and print media properties such as Slate, Foreign Policy magazine, the SocialCode digital advertising firm, a turbine-parts maker, and a company that provides home health- and hospice-care workers.

“Any incoming CEO would be envious of the position Don has put the company into,” O’Shaugh­nessy said in an interview. “Diverse business income streams and a fortress balance sheet really set the company to invest in its current businesses as well as companies I come across.”

O’Shaughnessy, known for his technology savvy, faces some early tests as Graham Holdings this week recorded a $230.6 million loss in the third quarter, largely due to a $248.6 million write-down in the value of its once fast-growing Kaplan Higher Education division.

Kaplan has been caught up in a national debate over the value of for-profit education. The Obama administration imposed new regulations on the industry as regulators and several states launched investigations into the industry’s marketing practices, which could leave students saddled with large loan balances and poor job prospects.

“Kaplan is a great business,” O’Shaughnessy said. “It has five or six businesses in it, and it will be a big part of the business for years to come.”

O’Shaughnessy joined Graham Holdings in 2014 as president to oversee investments and acquisitions and to help set a new direction for the company following the sale of The Washington Post.

He is a co-founder of online deals company LivingSocial and served as its chief executive before joining Graham Holdings. After a period of high growth, LivingSocial in recent years has been sputtering as questions have been raised about its business model.

O’Shaughnessy graduated from Georgetown University with a bachelor of science degree in business administration. He began his career at AOL and later ran product development at Revolution Health prior to co-founding LivingSocial.

O’Shaughnessy is married to Laura Graham O’Shaughnessy, Donald Graham’s daughter. Laura O’Shaughnessy is chief executive of SocialCode. They reside in Washington and have two children.

“Don will still be an active part of the company for years to come,” Timothy O’Shaughnessy said, noting that Graham Holdings is part of a family business legacy that goes back 82 years.