Indus Corp. of Vienna, a software engineering company, bought a unit of Alexandria's Halifax Corp. for $12.5 million in cash in an effort to grab a piece of the increasingly profitable defense contracting business.

Halifax's Secure Network Services business, which installs wires and cables in buildings that require security clearances, generated revenue of $13.6 million in 2004.

The Department of Defense was its biggest customer.

Halifax, a publicly held company that has owned the unit for more than 15 years, said the sale will allow it to focus on its main business, computer repair and maintenance for companies such as Hewlett-Packard Co.

The unit, which was 25 percent of the company's business, "wasn't where we were spending most of our time, and it wasn't related to our core business," said Charles L. McNew, Halifax's president and chief executive.

Halifax, which reported net income of $4.2 million in fiscal 2004, is projecting a loss of $1.4 million for the 12 months ended March 31, McNew said, connected to unexpectedly high start-up costs on a contract providing computer repair services to retail companies.

Money from the sale announced Friday will soften that blow.

Halifax has transferred about 100 employees to Indus, which will call the business Indus Secure Network Solutions. It will operate as a subsidiary of privately held Indus Corp.

Shivram Krishnan, chief executive of Indus, said the company provides software and technology support to non-defense agencies; for example, it develops software that tracks water pollution for the Environmental Protection Agency.

"By Indus neglecting to focus on the DOD and [intelligence], we are ignoring about 60 percent of the marketplace," Krishnan said.

Last week, Indus bought the privately held Aaron B. Floyd Enterprises Inc., an Alexandria-based defense contractor, for an undisclosed price. Krishnan said that Floyd's 2004 revenue was $14 million.

Joseph Vafi, managing director of equity research at Jeffries and Co., an investment banking firm, said the deal was a good one both for Halifax, which got a good price, and for Indus, which can enter a "market with good long-term prospects."

Halifax shares closed Friday at $3.97, up nearly 9 percent, or 32 cents, from the previous close.