Employees played basketball at the Vocus headquarters in Beltsville on Aug. 30, 2011. The company agreed Monday to be acquired by a private-equity firm. (Jeffrey MacMillan/For The Washington Post)

Beltsville-based Vocus, which makes software to help companies with media relations and digital marketing, agreed Monday to be acquired by a Chicago private-equity firm for $446.5 million.

GTCR paid $18 per share, a 48 percent premium over Friday’s closing price, in the all-cash transaction. The deal was approved by the Vocus board of directors and is likely to close before the end of the second quarter.

“Vocus has a demonstrated history of building innovative software and helping customers achieve success. We look forward to the opportunity to work with Vocus to enhance its industry leadership,” Mark Anderson, a GTCR managing director, said in a statement.

Founded in 1991, Vocus established itself by providing media-relations professionals with a database of journalists’ contact information. The Maryland firm has since expanded its software offerings to include digital marketing via e-mail and social media.

But regulatory filings show that the company’s finances have struggled in recent years. The firm posted a net loss of $21.8 million last year on revenue of $186.9 million. In 2012, Vocus tallied a net loss of $23.6 million on revenue of $170.8 million.

Rick Rudman, president and chief executive of Vocus. (Jeffrey MacMillan/For The Washington Post )

The company declined to comment beyond a news release for this article.

Jeff Houston, managing director of research at Barrington Research Associates, said that the company has seen a decline in its long-standing public relations business and that its digital marketing products remain unprofitable despite rapid growth.

“It’s just the nature of launching a new business — it takes a while for it to turn profitable,” Houston said. “There’s a balance between growth and profitability, and when something is growing pretty fast, it’s typically not profitable.”

Vocus has also shifted the focus of its digital marketing services to mid-size companies as opposed to small businesses, according to analysts at Robert W. Baird. That requires a different sales approach in a new market.

The turn began in earnest when Vocus shelled out $169 million in cash and stock to acquire iContact in February 2012. Customers use the e-mail marketing company to send electronic newsletters with updates on their businesses.

“We view digital marketing as offering a large opportunity for software firms that can leverage the secular shift in spend away from traditional media towards digital channels,” Steve Ashley, senior research analyst at Baird, wrote in an analysts’ note.

Capital Business is The Post’s weekly publication focusing on the region’s business community. For more Washington business news, go to capbiz.biz.