Capella Education Co., the Minneapolis-based company that runs one of the nation's biggest online universities, is merging with Strayer Education Inc., bulking up to face greater demographic and competitive pressures.

The all-stock deal, announced Monday, valued Capella at $930 million and sent the shares of both for-profit education companies higher.

It brings under one corporate parent Capella's online university, which has about 37,000 students, and Strayer's physical campuses, which serve about 41,000 students.

"By putting the companies together, we can offer a wider and more diverse array of solutions to students as they look to gain skills," Kevin Gilligan, Capella's chief executive, said in an interview.

The combined company will take a new name, Strategic Education Co., and be based in Strayer's home of Herndon, Va. It will also continue to have a significant presence in downtown Minneapolis, where the Capella name is on one of the tallest skyscrapers.

The principal education operations — Capella University and Strayer University — will remain separate, but students will be able to transfer credits between them.

Strayer chiefly serves undergraduate students while Capella's students are in graduate-level programs. Strayer dates back 125 years, is chiefly known for its business education and offers MBAs through a graduate program called the Jack Welch Management Institute. Capella started in 1993 and, in recent years, acquired coding academies and other businesses that provide job-ready skills.

The deal comes as schools of all stripes in the next few years will face a declining number of students coming out of schools and the likelihood costs rise. State-owned universities also are being roiled by the slow reduction of public funds as legislators seek ways to pay for the rising cost of health care.

Those forces are leading to remarkable shifts in the structure and tactics of education institutions. For instance, earlier this year, Purdue University announced it would buy the for-profit Kaplan University and use it to form an online college called NewU. Pennsylvania State University, which has had its state appropriation delayed, is now considering a tuition hike midway through the academic year.

Meanwhile, for-profit education firms ITT Educational Services Inc. and Corinthian Colleges Inc. collapsed outright in the past year.

Strayer approached Capella about a consolidation more than a year ago, but Capella executives and directors decided not to move forward at the time. The companies renewed their discussions just a few months ago.

"The environment is very competitive. The demand for higher education is relatively flat," Gilligan said. "While I think both Capella and Strayer were well positioned to grow, this was a compelling opportunity to create a level of scale and share capabilities."

Separately, Capella reported a 30 percent decline in third-quarter net income to $8.8 million and a 1 percent jump in revenue to $105.9 million. New enrollees at Capella University fell 2.1 percent.

Strayer had a higher market value than Capella before the deal and will use its shares to buy out Capella shareholders. When the deal is done, likely next fall, Strayer shareholders will own about 52 percent of the combined firm, with Capella shareholders the rest.

Merging the corporate operations of the firms should produce about $50 million in annual cost savings, chiefly through the consolidation of executive, marketing and some IT operations. The combined company will have its IT operations based in Minneapolis and Capella University will continue to be based here, Gilligan said.

Capella shareholders will get 0.875 shares of Strayer for each Capella share. That put a 22 percent premium on Capella's $764 million market value at Friday's close. Capella shares rose 30 percent on Monday and Strayer by 9 percent.

Karl McDonnell, Strayer's chief executive, will become CEO of the combined firm. Gilligan will become vice chairman. Robert Silberman, chairman of Strayer, will be executive chairman.